# Place Camera behind player -- this is a challenge

This topic is 5114 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

How on earth do I position my quaternion 3rd person camera behind a player posistion. The player is moved along like this: m_Pos.x += (m_VectorCircle[m_Angle].u * m_Speed) * (m_VectorCircle[m_UpAngle].u); m_Pos.y += (m_VectorCircle[m_UpAngle].v * 20); m_Pos.z += (m_VectorCircle[m_Angle].v * m_Speed) * (m_VectorCircle[m_UpAngle].u); I have a 3rd person camera, all the math, I can rotate around any axis around a point, or rotate the camera eye in place to simply look around. I have one way to position the camera behind the player: m_Eye.x = m_Target.x - (m_VectorCircle[m_Angle].u * m_Away) * (m_VectorCircle[m_UpAngle].u); m_Eye.y = m_Target.y + (m_VectorCircle[m_UpAngle].v * 20); m_Eye.z = m_Target.z - (m_VectorCircle[m_Angle].v * m_Away) * (m_VectorCircle[m_UpAngle].u); m_Eye being the CameraFrom and m_Target being the PlayerPosition. m_Away behind the distance I want the camera behind the player. That works. But there has got to be a way to do it using some vector math. I just can't think of it. So, question is: How do I position the camera behind a moving position in a manner that I do not need to use the above code snippet?

1. 1
2. 2
Rutin
18
3. 3
khawk
15
4. 4
A4L
14
5. 5

• 10
• 13
• 26
• 10
• 11
• ### Forum Statistics

• Total Topics
633744
• Total Posts
3013666
×