This project has moved and is read-only. For the latest updates, please go here.

Using Farseer from a top view perspective

Topics: User Forum
Jan 23, 2007 at 11:10 PM
I am trying to use Farseer from a top view perspective, but have some problems i cant figure out.

I try to move a crates around my map using ApplyForceAtLocalPoint, but my problem is that the crate never comes to an stop after the force is applied (It continues to rotate and move slowly)

I tried to change the RotationalDragCoefficient and LinearDragCoefficient, but this just makes the object slow down faster, not making it to a 100% stop.

Not sure about this, but i would guess it is because the object is floating in the mid air (if you think of it from a sideview perspective) and therefor not having any friction to affect it).

Any tips on how I can make the objects come to a complete stop. (a way to calculate friction against the "background")

Hope this was clear, if not ill try to explane some more ;).

Thanks in advance!

- Per Ivar
Jan 28, 2007 at 10:42 PM
I'm not really sure on this as I never gave top view perspective any thought when building the engine.

I think you best bet is to figure out an equation for simple sliding friction against your flat landascape, then apply it using ApplyForce(..)
Feb 5, 2007 at 9:35 AM
You could also do a check to see if the object is at a minimum velocity value and if it is just set it's velocity to 0. for example if a defined minimum velocity value was say 0.001f and your object had a velocity of 0.00089f the objects velocity would be set to 0f. That would help stop object from floating off into space.
Feb 6, 2007 at 3:06 PM
Absolutley createdbyx
Think this is the easiest way to go :)

Thanks for the heads up!