Buggy camera movement

Buggy camera movement

Postby Bow_vernon » 09 Feb 2012, 06:56

Hi, does anyone else experience this issue? basically, this bug always happen, although the occurrence is quite random in a race (could be at the start, or in the last lap). The camera basically stutter up and down in a rather "jerky" movement (it happens even when I'm driving on a smooth track). The buggy movement will vanish, though, when you pause the game and resume again (But this is kinda annoying since I can't concentrate on the good start :( ). I hope someone will take a note on this and kick the bug off. Thanks btw, it surely is one of the best racing games I've ever played :p

just out of curiousity, does this game use a fixed timestep? this might be it, just a guess though
Bow_vernon
 
Posts: 1
Joined: 09 Feb 2012, 06:50

Re: Buggy camera movement

Postby Auria » 09 Feb 2012, 17:03

Hi,

yes, camera being not smooth is a known issue :( we have a ticket for this on Trac and hopefully someone will tackle this before we release 0.8
Image
User avatar
Auria
STK Moderator
 
Posts: 2976
Joined: 07 Dec 2009, 03:52

Re: Buggy camera movement

Postby hiker » 13 Feb 2012, 00:46

Bow_vernon {l Wrote}:Hi, does anyone else experience this issue? basically, this bug always happen, although the occurrence is quite random in a race (could be at the start, or in the last lap). The camera basically stutter up and down in a rather "jerky" movement

While I agree with auria's statement, there is one point: you mentioned up and down, while the ticket is mostly about the camera moving forwards/backwards (which happens when the FPS varies, esp. when it is low). Is this what you see, or is it really an up/down movement (if so, could you perhaps post a video)?

Thanks!
Joerg
hiker
 
Posts: 1435
Joined: 07 Dec 2009, 12:15
Location: Melbourne, Australia

Re: Buggy camera movement

Postby Auria » 13 Feb 2012, 01:26

hiker {l Wrote}:
Bow_vernon {l Wrote}:Hi, does anyone else experience this issue? basically, this bug always happen, although the occurrence is quite random in a race (could be at the start, or in the last lap). The camera basically stutter up and down in a rather "jerky" movement

While I agree with auria's statement, there is one point: you mentioned up and down, while the ticket is mostly about the camera moving forwards/backwards (which happens when the FPS varies, esp. when it is low). Is this what you see, or is it really an up/down movement (if so, could you perhaps post a video)?

Thanks!
Joerg


I have not been able to really precisely track this, but for me, the FPS tends to be unequal. I suspect irrlicht is doing something once in a while so one frame in a while (about a second or two) is slower than other frames. This would exacerbate the camera issue
Image
User avatar
Auria
STK Moderator
 
Posts: 2976
Joined: 07 Dec 2009, 03:52

Re: Buggy camera movement

Postby hiker » 13 Feb 2012, 05:46

Auria {l Wrote}:I have not been able to really precisely track this, but for me, the FPS tends to be unequal. I suspect irrlicht is doing something once in a while so one frame in a while (about a second or two) is slower than other frames. This would exacerbate the camera issue

I think the ticket contains the details:
This is a basic problem of the camera implementation, it doesn't maintain a separate velocity for the camera, but kind of uses a weighted average of the camera and kart position. Now the weight depends on time step size, so if (for whatever reason) there is a significant slower frame, the camera will appear to move inconsistently


I think (sorry, I debugged that long time ago, and I didn't wrote the smooth camera implementation) it was the line:
{l Code}: {l Select All Code}
   current_position += ((wanted_position.toIrrVector() - current_position) * m_position_speed) * dt;

Assume a smooth run, in which case wanted_position - current_position is constant (i.e. camera constant distance behind kart), and dt remaining the same. Now for whatever reason the next time step takes twice as long. In this case, wanted_position will be twice as far from the current position (since the kart has driven twice as long). But in this case this is also multiplied with dt, which is twice as large. This results (I think :) ) in the jerky movement. It might be as simple as just removing dt from these (and other) formulas, I admit I never looked any further.

Termina1, are you still here and looking at that bug?

Cheers,
Joerg
hiker
 
Posts: 1435
Joined: 07 Dec 2009, 12:15
Location: Melbourne, Australia

Who is online

Users browsing this forum: No registered users and 1 guest