Hello!
I'm using Box2DX and I'm having Problems getting the circle shape rotating. When the circle is moving along a surface, the angle is always staying the same. Only if I explicitly move it with a Joint it's working properly.
Here's my Code:
I think this should all be right. Did anyone experience the same Problem or has any idea of how to fix this?
Thanks in advance!
I'm using Box2DX and I'm having Problems getting the circle shape rotating. When the circle is moving along a surface, the angle is always staying the same. Only if I explicitly move it with a Joint it's working properly.
Here's my Code:
Code: Select all
BodyDef bodyDef = BodyDef();
bodyDef.Position = Position;
bodyDef.Angle = Drawable.Angle.Value;
bodyDef.AllowSleep = true;
this.CircleDef = new CircleDef();
this.CircleDef.Radius = this.HalfWidthMeters;
this.CircleDef.Density = 10f;
this.CircleDef.Friction = 10f;
this.CircleDef.Restitution = 0.1f;
this.Body = physicsManager.World.CreateBody(bodyDef);
this.Body.CreateFixture(this.CircleDef);
if (dynamic)
this.Body.SetMassFromShapes();
I think this should all be right. Did anyone experience the same Problem or has any idea of how to fix this?
Thanks in advance!