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.

Author
Message
Levanthus
21
Years of Service
User Offline
Joined: 17th Apr 2003
Location: Cumbria, UK
Posted: 23rd Jun 2009 20:47
I seem to have a small problem with my camera, I have a routine set up for a first person camera and the WASD keys to move, i have created a very low polygon "room" and i can move around freely inside, however, i can move forward, back, left and right fine and when standing still rotating the camera with the mouse is fine, but when i move with the keys and rotate the camera at the same time it get really jerky and looks... well... terrible

I've tried using the arrow keys, just incase my keystate routines caused the problems, but that didn;t help, I've tried Sync rates lower resolutions, i just can't understand what the problem is.

I can see from your smile, you're not here for the sunset.
bobbel
15
Years of Service
User Offline
Joined: 5th Jan 2009
Location: In my DBPro case xD
Posted: 23rd Jun 2009 20:55
Can you post some code? otherwise we can't see what You might be doing wong

Levanthus
21
Years of Service
User Offline
Joined: 17th Apr 2003
Location: Cumbria, UK
Posted: 23rd Jun 2009 21:02 Edited at: 23rd Jun 2009 21:03
I appologise for the state of my coding.



I can see from your smile, you're not here for the sunset.
AndrewT
17
Years of Service
User Offline
Joined: 11th Feb 2007
Location: MI, USA
Posted: 23rd Jun 2009 21:13
I don't experience any jerkiness with that code.

i like orange
bobbel
15
Years of Service
User Offline
Joined: 5th Jan 2009
Location: In my DBPro case xD
Posted: 23rd Jun 2009 21:15
i think i've found a solution:

replace

cx#=wrapvalue(cx#+mousemovey())
cy#=wrapvalue(cy#+mousemovex())
cz#=wrapvalue(cz#+mousemovez())

with

cx# = curveangle(Camera Angle X()+(MouseMoveY()), Camera Angle X(), 10)
cy# = curveangle(Camera Angle Y()+(MouseMoveX()), Camera Angle Y(), 10)
cz# = 0

The problem was that the mousemovex...z return really hard values. like, the first frame they are 300, the second they are 0 or something. this makes the movement a bit jaggy. so if you smooth them using curvevalue, it get better! and also, making a matrix also makes it look a bit jaggy, so you better not make a matrix, only use it in early stages i think

Levanthus
21
Years of Service
User Offline
Joined: 17th Apr 2003
Location: Cumbria, UK
Posted: 23rd Jun 2009 21:16
really?
Weird...
I know it can't be my graphics card... thats for sure

I can see from your smile, you're not here for the sunset.
bobbel
15
Years of Service
User Offline
Joined: 5th Jan 2009
Location: In my DBPro case xD
Posted: 23rd Jun 2009 21:25
Well it kinda works i think, the original code looked jerky for my pc too, and i have a very decent laptop.

Levanthus
21
Years of Service
User Offline
Joined: 17th Apr 2003
Location: Cumbria, UK
Posted: 23rd Jun 2009 21:28
sadly it still seems to be a bit laggy and jaggy, i really don't understand why, i removed the matrix and changed the "wrapvalue" bits but it still goes all laggy when i move and rotate the camera at the same time the model i'm using has less that 600 polygons i have a pretty good spec machine that will run stuff a million times more detailed than this, surely textures wouldn;t make it do this would they?

I can see from your smile, you're not here for the sunset.
NeX the Fairly Fast Ferret
19
Years of Service
User Offline
Joined: 10th Apr 2005
Location: The Fifth Plane of Oblivion
Posted: 23rd Jun 2009 21:32 Edited at: 23rd Jun 2009 21:33
Mouse Z is your mousewheel. Angle Z is roll. You need neither.

Login to post a reply

Server time is: 2024-11-24 05:25:55
Your offset time is: 2024-11-24 05:25:55