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

Guest Anonymous Poster

Camera Directions????

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