Sign in to follow this  
flutey

camera problems

Recommended Posts

i am working in a hybrid OpenGL/DirectX 3D engine and i was starting to make a car game in which i want the camera to be always fixed on the player car my camera class has the 3 vectors loc,at,at which are used to update the graphics transfomation for both ogl or DirectX layers the camera At point, is getting update on a per famr basis according to the location of the car, and the loc, is just computed from it, by going backward in a certain direction, and the at vector is alwways 0,1,0 the problem is, some jumping occurs occasionaly, as if the car desont get rendred in the middle of the screen in some frames... the more the car goes faster, and far from the origin, the flickering problem is bigger i think this is happening due to floating pont error..but i am not sure i am sure many people faced this problem before...why it happens, and how to solve it?

Share this post


Link to post
Share on other sites
This sounds very weird.. The only situation where you could get floating point errors is that your world unit scale is very small (object diameters < 0.1 or something like that), and even then I don't think it should be very noticeable. Try scaling your world up by some factor and see if it might help.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this