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

Manually Adjusting Body Position's

Sep 2, 2010 at 4:31 AM

Here's a quick question, in FarseerPhysics 2.1 I had a method that makes certain game elements move up and down (bounce) along a sine wave. They also needed collision though, so I created a body & geometry for them, set them as static and ran the function... which all worked perfectly. Other physics objects etc would interact and be pushed up/down as the object moved. However... I've decided to upgrade to version 3. I've done the necessary adjustments, made the body's, attached the fixtures etc and now when I run the mover code, the other physics objects just pass right through them (for up-down movers) but the left-right movers collide with the other physics objects. I cant really understand why it's doing this... is it not possible to manually update the position of a body in FP3?

Sep 2, 2010 at 10:52 AM

Is not a good idea to move manually a body. The best way to move it is to apply impulses. In your case, you could create the body as Kinematic, and move it by assigning it a LinearVelocity to the path you want to follow.