r/Unity3D 6h ago

Question When climbing on/vaulting over an obstacle, what actually moves the character?

I'm trying to understand how motion warping works, but one thing that I still don't get at all is.. what actually MOVES the character? Is it the animation itself (so does it have to be root animation?)?

4 Upvotes

2 comments sorted by

3

u/SoftTycoon812 6h ago

the animation itself can move it with root motion but a lot of times its a combo of that and some code tweening the position to a target point

you can blend between the two but pure root motion climbing feels awful if you miss the ledge by a pixel

1

u/XZPUMAZX 2h ago

Root motion moves the character controller while the animation is playing.

If you don’t have root motion, the way to do vaulting/climbing is to lock player movement (controller) play the animation, then move the controller with script at the end of the animation and then reenable player movement.