Hi all,
So I'm getting there slowly with Box2D. I'm writing a 2D platform game, and I want to mimic the physics of Sonic the Hedgehog for the main character (at least as a base). I'm having a couple of issues.
Firstly, because my game is made up of tiles, and I know that using a box for the character is a bad idea (from the FAQ) I've been using a sphere. However, this causes a problem because I need my character to be half as wide as it is tall. How can I overcome this? Is there a way to create an Ellipse rather than a sphere? What's the normal way for dealing with this? If I could make an ellipse, how do I prevent it from rolling over onto its side?
Secondly, while using a circle is working *most* of the time. I've noticed that sometimes the shape can become immovable when it collides with a static box. I'm using SetLinearVelocity (although I'm intending to change that to impulses). Could a circle being stuck against the side of a box be caused by my (mis)use of SetLinearVelocity or is there another known situation where a circle could become stuck to a box?
So I'm getting there slowly with Box2D. I'm writing a 2D platform game, and I want to mimic the physics of Sonic the Hedgehog for the main character (at least as a base). I'm having a couple of issues.
Firstly, because my game is made up of tiles, and I know that using a box for the character is a bad idea (from the FAQ) I've been using a sphere. However, this causes a problem because I need my character to be half as wide as it is tall. How can I overcome this? Is there a way to create an Ellipse rather than a sphere? What's the normal way for dealing with this? If I could make an ellipse, how do I prevent it from rolling over onto its side?
Secondly, while using a circle is working *most* of the time. I've noticed that sometimes the shape can become immovable when it collides with a static box. I'm using SetLinearVelocity (although I'm intending to change that to impulses). Could a circle being stuck against the side of a box be caused by my (mis)use of SetLinearVelocity or is there another known situation where a circle could become stuck to a box?
