Closed leaf-node closed 8 years ago
Yep. If you set the id's yourself, you have do set it for everything. Otherwise all sorts of bad things can happen. Also, the id should be a non-zero integer.
Should write this in the docs. Or just make the ids private.. What do you think? They need to strictly follow these mentioned patterns to work internally in the World.
Hmm.. in an ideal world there would be a public getter and a private setter and/or variable. Otherwise more documentation would be very nice.
thanks! : )
I set the body id like so:
... then added a plane to it, then added another body and shape into the world with body id 1.
When I ran the simulation, the second body fell through the plane. When I set the second body id to 2, the object landed on the plane as expected.