   Topdown player-warlock movement in Box2D(.XNA)
  Hi, I have started a discussion at box2d.XNA codeplex site but nobody has answered so far, so I hope I d find more answeres here - everything you need to know is already written here: http://box2dxna.codeplex.com/Thread/View.aspx?ThreadId=211636Thanks for any suggestionsEDIT - Content of the linked page:Hi,i'm developing a game called Warlock Football as my bachelor thesis and i'm using your Box2D port. Although i'm not sure if I should post the question here, I'll try it. In worst case please redirect me somewhere else :) I have a problem with motion of th warlocks who are basically moved by player. In this case they can either move forward or backward and then they can turn right and left. The first is made by applying force to their bodies and the other by applying torque. To limit the speed and rotation speed I use linear and angular damping, but since they are "humans" the movement should have very high acceleration and they should stop immediatelly when you stop pressing the movement key. I handle this by applying quite big force and torque and setting damping quite high, but still it makes the movement float-like. I have also considered setting their linear and angular velocities directly, but then I'm afraid that I'd screw the whole physics, for isntance when there would be an explosion near by, you'd able to escape its physical consequences by pressing movement key and thus overriding the applied forces. Has anyone any answer to such a question? (I actually hope that I have explained myself clearly and understandably :) In addition here is the body definition code:// define his body var bodyDef = new BodyDef();bodyDef.type = BodyType.Dynamic;bodyDef.position = position;bodyDef.angle = angle;bodyDef.bullet = false;bodyDef.active = true;bodyDef.fixedRotation = false;bodyDef.allowSleep = false;bodyDef.linearDamping = 4.5f; // DAMPING HEREbodyDef.angularDamping = 5.0f;// define his shapevar circleShape = new CircleShape();circleShape._radius = 1.4f;// define fixture using his shapevar fixtureDef = new FixtureDef();fixtureDef.shape = circleShape;fixtureDef.density = 10.0f;fixtureDef.friction = 0.0f;fixtureDef.restitution = 0.0f;// forward force and torque for SteeringComponent <- FORCES FOR MOVEMENTfloat forwardForce = 2800.0f;float torque = 1200.0f;And the way I apply forces for movement:  // check movement flags and apply forces accordingly  if ((Move & Movement.Forward) == Movement.Forward)  { Vector2 force = new Vector2((float)Math.Cos(physicalBodyComponent.Angle), (float)Math.Sin(physicalBodyComponent.Angle)); force *= forwardForce; physicalBodyComponent.ApplyForce(force, physicalBodyComponent.Position);  }  if ((Move & Movement.Backward) == Movement.Backward)  { Vector2 force = Vector2.Negate(new Vector2((float)Math.Cos(physicalBodyComponent.Angle), (float)Math.Sin(physicalBodyComponent.Angle)));  force *= forwardForce; physicalBodyComponent.ApplyForce(force, physicalBodyComponent.Position);  }  if ((Move & Movement.TurnLeft) == Movement.TurnLeft)  { physicalBodyComponent.ApplyTorque(-torque);  }  if ((Move & Movement.TurnRight) == Movement.TurnRight)  { physicalBodyComponent.ApplyTorque(torque);  }[Edited by - Santhos on May 8, 2010 12:36:58 PM]
  It might be easier for people to help if you summarized the question here (or at the very least, made the link clickable so that we don't have to copy-and-paste the URL).Also, if you haven't already, I'd recommend posting to the Box2D forums. Questions of this sort are asked frequently there, and I imagine if you posted there you'd get some feedback/suggestions.As for your question, the only thing that immediately comes to mind is to make the characters particles as far as Box2D is concerned (e.g. by enabling 'fixed orientation' for the bodies), and then handle the rotation yourself.This would leave you with the same problem you have now as far as linear motion goes, but perhaps you could tweak that behavior by using impulses (for instantaneous starting and stopping) and/or adjusting drag dynamically based on whether the character is moving (linearly) or not.Again though, I'd recommend asking on the Box2D boards if you haven't already.   ;  Right - sorry, I didnt notice that the link wasnt self-created. I have put all the text from the link inhere, so now it shouldnt be that bothering :)I have posted the question here first, because it looks a little more alive here. In addition I have account here - but as you suggest, I ask on their forum, too.I also have seen several similar post, but usually trying to solve motion of cars, which would the code I have now handle. The problem is that "human movement" is somehow specific (or at least I have such a impression).