- Home /
3rd person rigidbody controller help :(
I'm using the FPS Rigidbody Controller found here. I'm trying to convert it to a 3rd person controller. I've gotten the character to move in the direction the camera is facing, but I can't get it to rotate to that direction. I used some of the code in the 3rd person controller that came with unity as my guide. Thanks for your help.
Answer by andyspeak · Aug 31, 2013 at 09:06 PM
i think your missing
transform.rotation = Quaternion.LookRotation(moveDirection);
because cc as .move
rigbody you need to split your rotation and movespeed this is what i have
Rigidbody rigBody = GetComponent(); Vector3 movement= transform.forward moveSpeed; rigBody.MovePosition(rigBody.position + movement Time.deltaTime); transform.rotation = Quaternion.LookRotation(moveDirection);