java - Math behind a 3rd person camera -
I am trying for some time now and I think nothing about the third person's camera . I just want to create a simple 3 person camera but it becomes difficult because I am in 3D. So far, I can do a camera on 1 plane, but after that it's messed up. If I know any person then I am using libgdx with model libgdx.
I do not need to give you codes for this, I just need help about the information in which I have information. I know the velocity in x and z, the rotation of the object x y z, and its position at x y z I can keep an eye on the camera for the object, so what I have to do, behind it and in the after it does not matter what the orientation is for the object. Any link or explanation is highly appreciated :)
Solution: I will update the position of the player after each frame: Where This is a simple exit point. You probably want to exclude the movement by limiting that speed on which the camera can be transferred or it can give the movement of the second position in the direction of this goal and the second rotating movement.
In the comment, Xoppa posted a link to its tamper proof The camera provides and it's amazing because it was not an answer, so I accepted it, but what did I want for it? In response to this question, Expo gets all credit links, it is easy to find.
camera.up.set (0,1,0); // Be sure to make sure // if it is necessary // always after the lookAt () call of the last frame camera.exion.set (player.position) .add (-UNITS_BACK, UNITS_UP, 0). Totate (vector 3.up, player.engal); camera.lookAt (player.position); Camera.update ();
player.angle is the number of counter-clock, facing the player from the X-axis.
Comments
Post a Comment