#2025 10 15 19 19 25

1 messages · Page 1 of 1 (latest)

true marsh
#

Looks like you're rotating the player game object via script and then doing the turn animation at the same time or something similar, is that right?

I've found that to be notoriously finicky in the past, you'll have things where the player object is rotating and the animation plays itself relative to that rotation so both rotations get added together

You could probably do something like play the animation when the player should turn and once the anim has fully finished playing only then snap the player rotation to exactly where it should be but again this is really finicky and would need to be synced fairly perfectly with the anim when it returns to the rest pose

IMO the better approach is to setup your animations and animator to use root motion, that way the animation will directly drive how your player object should move and be rotated

analog bone
#

Yes I rotate the player game object with script, and yeah I try to do the turn animation at the same time, I try to recreate the GTA V player movement but is difficult, I can show you the code I made for the rotations if you want

true marsh
#

No thanks, seeing the code won't help me much, I definitely recommend looking into root motion animations and understanding them better, I think it's the better approach for this to be honest

analog bone
#

Okay, thank you for your answer, I'm gonna look into root motion animations, big thanks I try to solve this problem and find help on French communities but impossible ( I'm french ) so big big thanks to you for your help and your advice

analog bone
#

Oh I maybe found the problem, my animation doesn't have root motion

analog bone
#

Yes my problem is just, the animation and the character block me, I can't pass all of that in humanoid, I'm forced to stay in generic animation type

true marsh
#

If you’re having problems or getting errors with the humanoid avatar it’s likely your rig setup is not properly configured, Unity expects a specific rig hierarchy with properly named bones