Getting the position in front of an object.

Hello, I’m after a way to get the position in front of an object.

For example, I with to set the camera’s position to a point in front of the player for a cut scene.

My purpose for this method is not actually for a cut scene, but you get my point.

Any ideas?

Correct me if I am wrong: you would like that a cut scene or something happens when the player arrive to certain point in the world?

If this is correct you can create a box with a collider and use a OnTriggerEnter method that will let you understand when the player triggers with the box (that in your game would be: when the player arrives at a certain point)

transform.forward gives you a normalized direction to the front
transform.position gives you the current position

so you figure out the rest.

@anflex : You missed the part where I said I’m not actually going to use this for a cut scene, but used it for an example. eg, to zoom in on the players face etc.

Cheers, I got it :slight_smile:

yeah I understand it, but it is not relevant to understand what to do next. I was trying to explain you how to handle the event :wink: