Moving a static body?

Mar 12, 2008 at 12:50 AM
I'm making a game where the player needs to catch shapes in a bucket, more or less. What I'm trying to achieve is the bucket being controlled entirely by the controller's input (meaning it floats in the air, it doesn't get knocked by shapes landing in it, etc). The solution I've settled on is having the bucket be static, and manually updated its position and orientation in response to controller input, then manually setting appropriate linearvelocities and so on. This seems to make shapes follow it properly and in general behave as though the bucket is moving properly.

The problem is the bucket seems very slippery. Shapes accelerate with it kind of slowly and slide a ways before coming to a stop. I'd like the bucket to be stickier so it's easier to keep the shapes balanced, but setting friction doesn't seem to make any difference. Is this due to the way I'm handling the bucket? I was hoping that setting linearvelocity and angularvelocity appropriately would satisfy the simulation -- is there another force I need to update to make friction work?

Alternatively, what's a more appropriate way of handling the bucket? The fact that I don't want it to get knocked around by the falling shapes seems to tie my hands a lot here. Any advice would be appreciated!
Mar 20, 2008 at 6:48 AM


Terazilla wrote:
I'm making a game where the player needs to catch shapes in a bucket, more or less. What I'm trying to achieve is the bucket being controlled entirely by the controller's input (meaning it floats in the air, it doesn't get knocked by shapes landing in it, etc). The solution I've settled on is having the bucket be static, and manually updated its position and orientation in response to controller input, then manually setting appropriate linearvelocities and so on. This seems to make shapes follow it properly and in general behave as though the bucket is moving properly.

The problem is the bucket seems very slippery. Shapes accelerate with it kind of slowly and slide a ways before coming to a stop. I'd like the bucket to be stickier so it's easier to keep the shapes balanced, but setting friction doesn't seem to make any difference. Is this due to the way I'm handling the bucket? I was hoping that setting linearvelocity and angularvelocity appropriately would satisfy the simulation -- is there another force I need to update to make friction work?

Alternatively, what's a more appropriate way of handling the bucket? The fact that I don't want it to get knocked around by the falling shapes seems to tie my hands a lot here. Any advice would be appreciated!


I have only been working with Farseer for a week now, but play with LinearDragCoefficent of your buckets Body. It applys a "Space" friction to all forces acting on the body.