Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.

Guest Anonymous Poster

Camera Directions????

This topic is 6842 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

Guest Anonymous Poster
I'm tryng to make a kind of game, and at the moment i have a room, and a entity in the middle of it.
I wanna move the entity, and i wan't the camera to follow the entity, if the entity goes forward, the camera goes forward, if the entity rotates left, the camera rotates left.
Well, what i've made so far is this..

When a key is pressed, i move the entity with the PR_MoveEntity, and before render the all scene i do this:
PR_PositionCameraSource (camera, entity_boom->orientation.location.x, entity_boom->orientation.location.y, entity_boom->orientation.location.z-800);

PR_PositionCameraTarget (camera, entity_boom->orientation.location.x, entity_boom->orientation.location.y, entity_boom->orientation.location.z+800);
PR_SetActiveCamera (camera);

Is there a better way to do this??? a faster one??


Share this post

Link to post
Share on other sites
Try looking at the land1 example source code.

[This message has been edited by voodoo (edited December 29, 1999).]

Share this post

Link to post
Share on other sites

  • 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!