- Home /
Player to always face 'track' forward direction
Hi,
I was wondering if anyone can suggest the best way to have an object/Player always face the forward direction of a 'track' he is on. For example, I have a Player (with parented camera) inside a curved tube who is initially facing in the Z-direction. As the tube/track curves (say to the Left), I would like the Player to always be facing in the forward direction relative to the track angle.
Any ideas? Cheers
Answer by Berenger · May 20, 2012 at 02:06 PM
You could create a path (fancy name for an array of empty gameobjects) going through that tube right in the middle. Then, Try somehow to have an other gameobject moving along that path in a way that it is always ahead of the player. Then, you can use LookAt for the player's orientation.
Your answer
Follow this Question
Related Questions
How to make an object lookat and rotate on its local axis simultaneously 0 Answers
How could I use AddForce() towards another Object without using transform.forward 1 Answer
Detecting when objects are facing each other 4 Answers
Rigidbody to follow player around 1 Answer
2D Mouse and Right analog as Direction for the flashlight. 2 Answers