Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / shaking Cam

Author
Message
Nic
20
Years of Service
User Offline
Joined: 26th Jun 2004
Location:
Posted: 28th Oct 2004 15:43
ive been having this probelm for a while and just cant suss it.
i have my player object - an aeroplane for example. I give my camera position variable
CX
CY
CZ
And now i want my camera to follow the object. But it shakes when the object is placed at an angle. Im using this code as a very simple way of following the object, just for the early stages of the programmming.

Can anyone help?
Nic
Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 28th Oct 2004 15:53
Have you tried using floats instead?

Depending on your object movement code this might help. If you move whole number distances it won't. If you use float (decimal) numbers to move the object 1 this will smooth it out.

Nic
20
Years of Service
User Offline
Joined: 26th Jun 2004
Location:
Posted: 28th Oct 2004 16:24
Ok thanx im at work now so ill try it another time buti am moving whole number distances.
Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 28th Oct 2004 17:11
It may not help then. Make sure you are using sync on, sync rate, and sync to control syncing. Also you may want to search and make sure there is nothing else in the program changing any of those variables accidently or accidently moving the camera's position. Also make sure if you use CY in one spot you don't have CY# in another and so on with all 3 variables this can cause weird results. Hope you get it straightened out. Good luck.

BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 28th Oct 2004 18:55
you could also use curvevalue() and curveangle() to smooth the transition.

BatVink
http://biglaugh.co.uk/catalog AMD 3000+ Barton, 512Mb Ram, 120 Gig Drive space, GeForce 5200 FX 128 Mb, Asus A7N8X Mobo.
Terms & Conditions apply

Login to post a reply

Server time is: 2024-09-23 03:29:59
Your offset time is: 2024-09-23 03:29:59