Freelancer Community Network
Reminder: Internet Explorer 6 or below are NOT supported.
Multiplayer Connection Tutorial
Collapse/Expand Random Image
Collapse/Expand Login


Remember me

Lost Password?

Register now!
Collapse/Expand Chat
Collapse/Expand Who's Online
62 user(s) are online (28 user(s) are browsing Forum)

Members: 0
Guests: 62

Collapse/Expand Donations
Monthly costs: -30€
Income (ads): +5€
Donations (last month): +0€

Current balance: 55€
(last updated 04/2021)

Please make a donation if you want to help keeping The-Starport online:

Collapse/Expand Links
Collapse/Expand Advertisement
There are currently 62 users playing Freelancer on 37 servers.
May. 7, 2021

Browsing this Thread:   1 Anonymous Users

 Bottom   Previous Topic   Next Topic  Register To Post

Roll causes noisy angular velocity?
Starport Admin
2009/2/21 21:42
Registered Users
Posts: 3520
So I'm sitting here rather stumped by this.

I'm reading the angular velocity of the player's ship to use for interpolation and animation and that works perfectly when it comes to yaw and pitch. I do so using PhySys::GetAngularVelocityOS, though I tried CObject::get_angular_velocity with identical results.

So this all works fine for yaw and pitch, but if the player begins rolling, the angular velocity becomes extremely noisy, frequently shifting between values multiple times per second. Worse, it's not just the roll component: every angular velocity component is similarly affected.

I've graphed the result here:

In the first zone, I do mostly yaw movements, which affects the blue curve. Then I switch to pitch, which affects the yellow curve. Both of these are smooth and work exactly as you'd expect.

However, when I start to apply roll, all three values begin exhibiting a sawblade pattern which persists for as long as roll is applied and affects all three components.

The dark orange line near the origin is the time delta, which doesn't seem affected by this problem (so it's not the provided time delta that goes crazy).

Since rolling wasn't enabled by default, it's possible that there's a bug with it somewhere, but I'm not sure what that could be. I've tried to apply the roll component myself to the player's IBehaviorManager through update_current_behavior_direction, which works fine but doesn't solve the issue.

Does anyone have any clue what could be the problem?

Posted on: 2015/10/27 20:46
"Cynicism is not realistic and tough. It's unrealistic and kind of cowardly because it means you don't have to try."
-Peggy Noonan