Animation not affecting global position of element

Hey! :slight_smile:

The player can without animation drop a gun where the player currently is located without a problem by removing the pistol from the player object and appending it to the map.

However, when using animations, the pistol is dropped where it was initially picked up instead of where the player now actually stands. I tried using “Apply Root Motion” which fixes the dropping issue, but then completely messes all the animations up - making them face in wrong directions etc.

So, is there a fix to this, or do I have to set “Apply Root Motion” to true when dropping the pistol, and then set it to false when picking it up?

Regards,
Quist

You probably just have to clear out the object’s .localRotation and .localPosition when you pick it up.

After reparenting:

thingy.transform.localPosition = Vector3.zero;
thingy.transform.localRotation = Quaternion.identity;

Hey Kurt, det issue happens even before dropping and picking it up. You can see it here:

https://vimeo.com/549471883

As you can see the animation completely changes when I enable “Apply Root Motion” for some reason… :confused: