Jump to content
  • Advertisement


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


How to do Camera Angle like Tomb raider

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

Without taking Collision detection for the camera into account, how do you have the camera behind the character? Say you have the position vector for the character, and a unit vector of direction he''s facing. Would you recommand using gluLookAt() or just plain glTranslate() / glRotate()? One more thing, when I use gluLookAt(), the diffused like looks fine, but when I just use glTranslate / glRotate without gluLookAt, there seem to be only ambient light. Can someone tell me why that''s happening? Thanks in advanced....

Share this post

Link to post
Share on other sites

Transform the angles to a Vector describing how the character is facing(using sin and cos...you can surely figure out a formula yourself(i did)):

(facing is normalized)

camera = character_origin - facing * cameradistance;
cameradir = character_dir

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!