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 / Jiggy Jitter, Problem.

Author
Message
Peter H
20
Years of Service
User Offline
Joined: 20th Feb 2004
Location: Witness Protection Program
Posted: 29th Apr 2004 17:22 Edited at: 29th Apr 2004 17:23
ok i decided to post this in the newcomers forum becuase even though i consider myself in-between beginner and intermediate this is a "beginner" question

ok i have this code for a FPS that i'm making. this is not all the code just the part that makes it jitter(but it WILL run by it's self)...

and when you walk around (WASD+mouse) it "jitters"
BTW this code does the same "jittering" when it's used with a .x level and the "Nuclear Glory.DLL"

note: only media required is a texture for the matrix.

Thanks in advance!


Formerly known as "DarkWing Duck"
zircher
21
Years of Service
User Offline
Joined: 27th Dec 2002
Location: Oklahoma
Posted: 29th Apr 2004 18:55 Edited at: 29th Apr 2004 18:56
Here's an idea, if you're not hitting a key or moving the mouse, why are you positioning and rotating the camera? Perhaps you have some annoying floating point precision error.

Try this, set a flag to zero and only set it to one when there is mouse movement or a key press. When the flag is set to one, perform your normal camera commands.

No idea if this will cure your problem, but it could not hurt to try.
--
TAZ

Flashing Blade
21
Years of Service
User Offline
Joined: 19th Oct 2002
Location: United Kingdom
Posted: 29th Apr 2004 19:44
try making the variables posx,posy,posz floats

change:

posx=object position x(id)
posy=object position y(id)
posz=object position z(id)


yrotate object id,camera angle y()
position camera posx,posy+8,posz

to:

posx#=object position x(id)
posy#=object position y(id)
posz#=object position z(id)


yrotate object id,camera angle y()
position camera posx#,posy#+8,posz#


Peter H
20
Years of Service
User Offline
Joined: 20th Feb 2004
Location: Witness Protection Program
Posted: 29th Apr 2004 20:29
Thanks for the Input!

ok if i do this...(using floats and check)

then the mouse doesn't work...

and if i do this...(floats and different check)

it runs but still "jitters"

if i do this...(floats and NO check)

it does the same as the last one

so it seems that i need either a) a better way to check for the mouse moving... or B) something else


Formerly known as "DarkWing Duck"
Flashing Blade
21
Years of Service
User Offline
Joined: 19th Oct 2002
Location: United Kingdom
Posted: 29th Apr 2004 21:12
source attatched:


Peter H
20
Years of Service
User Offline
Joined: 20th Feb 2004
Location: Witness Protection Program
Posted: 29th Apr 2004 22:02
oh...THAT position camera

Thanks Alot! ...(it also works in my .x level )


Formerly known as "DarkWing Duck"

Login to post a reply

Server time is: 2024-09-22 07:42:22
Your offset time is: 2024-09-22 07:42:22