- Home /
When switching camera position...
I have a game where you can switch between first person and third person. I've made a vector which stores the distance that needs to be between the head and the camera in third person. The problem is that it changes depending on how the head is positioned (head is turning together with the camera horizontaly)... how i can calculate the accurate distance and how i can set the camera's position properly?
Answer by abaza121 · Apr 23, 2018 at 02:48 PM
you can use the x difference as the clear distance (without accounting for heights) assuming you are in a 3D space u can create 2 new vectors where z is zero'd and get Distance between them using Vector3.Distance(a,b).
Your answer
Follow this Question
Related Questions
How do you move the camera relative to the direction it is currently facing? 1 Answer
Smoother Camera Movement without making camera child of the player? 0 Answers
Lock Camera to be within a box type area? 1 Answer
Finding the limits of transform coordinates 1 Answer
Changeing Camera Position 1 Answer