Floating object

Apr 26, 2011 at 10:36 PM

Hi

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 5: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 5: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 6: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. 

Developer
Apr 29, 2011 at 6: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.