- Home /
Question by
Igorotak · Apr 15, 2018 at 09:29 AM ·
raycastaimingthird-person-camera
How to make third person character aim at object in front of camera?
I'm trying to make a third person game. For the aim mechanics, I'd like to make the character face towards whaterever is in the centre of the camera. I tried adding a raycast and gameObject.LookAt (RaycastHit.point) but whats that doing is making the character aim at the origin point of the object. How do I fix this?
Comment
Best Answer
Answer by Igorotak · Apr 15, 2018 at 08:05 PM
I was able to fix this myself. Instead of RaycastHit. point, I actually had RaycastHit.transform.position. i just needed to change that to the previous one