-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nothing Moves #17
Comments
The only difference I can see between mine and yours is that instead of using B2BodyDef{} use MakeB2BodyDef(). The same applies for all the structures you have created from Box2D. |
Yes, doing bodyDef := box2d.MakeB2BodyDef() seems to output something different. It also makes sense since these "constructors" do set certain default values that wouldn't be set otherwise. |
In addition to what is said, you need to use ... groundBox := box2d.MakeB2PolygonShape() instead of using groundBox := d2.B2PolygonShape{} |
Just in case this helps anyone else who is looking here: The same thing was happening to me and my problem was that I had const TIMESTEP = 1 / 60
// Instead of
const TIMESTEP = 1.0 / 60.0 If you do the first one it rounds down to 0, therefore no time passes in the simulation. |
I followed the instructions for the hello world program, in the PDF linked from the README. And nothing moves. Perhaps I did something wrong.
Truthfully I tried incorporating this module into another project I'm working on and it failed there. Which is when I took a step back, tried the hello world, and found that didn't work either.
The text was updated successfully, but these errors were encountered: