İ want rotate my character upper body independently from lower body.Upper body will follow mouse position.By the way its top down shooter on 3D template.İ tried almost everything but I couldnt solve it.any idea ?
What have you tried?
Literally what you can find in google.So i already checked tutorials it didnt work for me.Last thing what I have tried, I tracked mouse position on world position with ray cast.Then I used it for change upper body localeulerangles.It worked but problem is when character move opposite direction body follow to mouse with inverse position. When I want turn it right it turn it left or left to right
So your character’s upper body is facing backwards from where it’s supposed to be facing when it isn’t supposed to?
No, I clamp the values it works correctly.Problem is my character’s controller is looks like witcher what button you press it facing that direction with all body.So for example if I press W and rotate upper body with mouse it works correctly but if I press S upper body doesnt rotate correctly when I move to mouse left upper body looks right or when mouse on right it looks left.Same with A and D direction aswell
I found solution.I just used some object as target reference instead of mouse position.But now character animations have weird behaviour.
Upper body and lower body should have their own respective animations, so that they don’t cause strange behavior.
Yes !,I used avatar masks for both lower body and upper body now all animations work as it should. Thanks a lot for idea
Also you can use ik pass to rotate spline bone with unity ik to your desired target. When it is too much, character can start to rotate too.
I will check this as well thank you.