Hello,
I started making a game some time before, and I run into one problem.
I have a raycast infront of the player and I want him to look on the object this raycast hits. I managed to do it with Quaternion.LookRotation but the player looks at the center of the gameObject.
The problem is that I want the player to look from the directon of the object, but not in the center of it.
Sorry for not being clear enough, but here’s a picture for what I need:
How can I do this?
Thanks!
Edit:
I think to use trigonometry for this. Bad idea?