Jump to content
  • Advertisement
Sign in to follow this  

camera implementation in java

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

so i've really been struggling to get my camera working for my flight simulator i'm trying to make so i have multiple trees on my screen placed on random spots that have the same CTM and then i have my lookat array, lookfrom array, and lookup array so pretty much this how i implemented my camera 1. for my vector Z i minus my lookat to my lookfrom array 2. then i normalize my vector Z(assuming my normalizing is correct) 3. for my vector X icross my vector z and my lookup 4. then i normalize my vector X(my normalizing is correct) 5. for my Vector Y i cross my vector X and my vector Z then i put them into my camera CTM(assuming my Camera CTM is correct) Lastly i apply the camera CTM to all my objects on my screen and draw everything out. The problem is that when ever i rotate on the x axis or the y axis my images get all screwed up, the only thing that seems to be working is the moving on the z axis

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!