Axis-based Lineardamping

Discuss any questions about BEPUphysics or problems encountered.
Post Reply
Kataan
Posts: 10
Joined: Tue Mar 22, 2011 10:57 am

Axis-based Lineardamping

Post by Kataan »

Hello,

I see Entity only has a single float for lineardamping.

Is it possible to have axis-based lineardamping for Entities?

So you could have different lineardamping values for X, Y and Z.

And if not, why did you decide against it?

Cheers,

Kataan
Norbo
Site Admin
Posts: 4929
Joined: Tue Jul 04, 2006 4:45 am

Re: Axis-based Lineardamping

Post by Norbo »

It's not built into the engine since it's a pretty rare use case, and it is easy to do externally. Damping just removes a portion of the momentum each frame; instead of scaling the whole momentum down, scale the axes down independently.

There are also constraints which can act like axis dampers. LinearAxisMotors with a velocity goal of zero do this. Constraint "softness" is inverse damping. If you were making an articulated structure that relied on the damping, this would be the best option.
Post Reply