Jump to content
  • Advertisement
Sign in to follow this  

Third Person Camera Help

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

If you intended to correct an error in the post then please contact us.

Recommended Posts

Urgent! I need help with the game im developing.

Basically, its supposed to be a game with third person camera . This means that the camera will revolve around an object with the movement of the mouse.

So far I have these:
- an object (to be focused by the camera)
- a camera that moves according to the mouse movement (like an fps).
- a variable that holds the distance between the camera and the object.

the methods used in order to move objects and the camera are as follows:

To move objects I use:
translate(float x, float y, float z) <--this method will move the object position by adding the vector passed into the object's(or camera's) current position. So basically, if I have an object in (1,1,1) and I translate it by (0,5,2), the object's new posision will be at (1,6,3).

To rotate objects I use:
rotatex(float rad), rotatey(float rad), rotatez(float rad) <--- These methods rotate objects according to the axis. So basically, calling rotatey() of an object will make it rotate like how your neck moves when trying to say "no".

The game I'm working on is using the DirectX sdk and is programmed in C++

Hopefully, someone out there can help me. I'd be very very thankful.

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!