Hi everyone,
I'm having a problem getting the `SetLookAtPosition()` function to work correctly. I've looked at other threads but I cannot find anything similar to this problem. I have provided a screenshot of what it looks like when I use it (left):
![alt text][1]
I'm trying to get the character look at the camera. On the right side is a screenshot of the bones in maya and their orientation.
This is what I'm currently doing in the `LateUpdate()` method:
void LateUpdate()
{
_animator.SetLookAtWeight(1);
_animator.SetLookAtPosition(mainCamera.transform.position);
}
If I comment out those 2 lines then the character's head is animated as it should.
Even when the camera is rotated nothing seems to happen. When I use the robot model from the mecanim tutorial instead of this one everything works perfectly fine.
Anyway I'd be very grateful if anyone has an idea what the problem could be, so thanks in advance! Oh yeah I have the pro version of Unity (4.1.5f1)
[1]: /storage/temp/13989-lookatpositionproblem.png
↧