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

Floating object

Apr 26, 2011 at 11:36 PM


I was wondering if someone could help me. I am looking for a way to make objects float in mid air I noticed Ignore gravity but it seems to make it float. 

Thanks in advance

Apr 28, 2011 at 6:32 PM

I'm new to Farseer, but are you asking how to "glue" an object to a specific position?

I believe you want to use body.IsStatic = true; (where body is the name of the body you want to be fixed)



Apr 28, 2011 at 6:34 PM

No I don't mean gluing them I mean they can move but they aren't effected by gravity but can still collide with things.

Apr 28, 2011 at 7:44 PM

Well, static achieves this. They can still be moved, but have to be moved manually. They won't move on account of things running into them. 

Apr 29, 2011 at 7:23 PM

If you want to have these move with velocity over time, you'll get better collision behavior if you use BodyType.Dynamic rather than setting position of a static all the time.