camera implementation in java

Started by
-1 comments, last by hikari33 15 years, 3 months ago
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

This topic is closed to new replies.

Advertisement