Download

Add local offset doesn't work as intended

Hi, I have a weird behavior with my blueprint setup.
MyCharacter is a child from Character blueprint, it contains a scene component(FPParent), which is a holder for a First Person Camera and a First Person Rig.(See P1)

I am implementing the crouch feature, I find that after crouch event, the camera will snap to a lower height due to immediate change in capsule height, which isn’t what I want. So I decide to add an offset to FPParent scene component after crouch event to maintain the overall height of the camera, and then use the Timeline to slowly bring the FPParent(along with camera) down.
I try to add local offset for the FPParent scene component on event “OnStartCrouch”, with the offset of “half height adjust” in Z axis(SeeP2). However it doesn’t change the scene component’s transform at all. I try to print out the relative location of my FPParent. It does not change.
The most weird thing is, if the “delta location” isn’t my intended offset, for example, I add a small offset to x or y axis(See P3), this function works fine. It just doesn’t get me into the exact right position. It looks like that if I try to bring my FPParent back to exact location it was before crouch event, the function stops working. It works in all other cases. I also tried that directly adding offset to FPCamera, it would work. But I want to move the entire scene component.

Does someone know what is happening? Thanks for any help