problem rotating bones whith mouse

hi there, i am making a 3 person shooter, and i have a lot of animation, but i want to control spine and chest bone with mouse soo, you can watch where the player is aiming and shooting, i remenber in previous version of unity to achieve that, you have to make an empty object parente to the bone with the rotation script and everything is fine, but making that in unity 5 i discover a really really mess in all animation (doesnt play well even if i remove the script) only making a parent object to a bone and the animation doesnt work well.
Any help please

a video showing the problem

Hi there - seems like you are already using “new” mecanim system? (If the video is yours).

Have you checked blend trees from animator manual? It might be enough unless you want to aim exactly to arbitrary direction.

Or if that is not enough, check out OnAnimatorIK() and LateUpdate() to manipulate bone rotations.

hi eses, thank for answering, i found a solution, like what you said, using LateUpdate works fine, so dont need anymore to make a empty parent, thanks again.

cheers.

1 Like