UPDATE: with some messing around, I have replicated the bug, but the bodies can rotate in space if another body hits them. Almost as if they have a revolute joint pinning them to the background. I haven't created that joint, but have heard this sort of thing can happen when a dynamic body overlaps a static one. Only problem is these dynamic bodies are NOT overlapping a static body...
Hi folks. I have an issue that I just can't seem to sort out. I have a Box2D project that I've been working on for a while and up until now all my bodies, fixtures, joints, etc., have behaved as I would have expected. Now, I have created two bodies and sometimes when I run my program, they will not move, no matter the size of the force applied to them.
Other times I run my program and they work great, responding to all the forces and impulses that I apply to them.
I for the life of me cannot figure out why this is. I create the bodies in very typical Box2D form, they aren't terribly big, no out of the ordinary values for friction, density, etc. They each have one, non-sensor fixture. They have no joints attached to them. They are pretty darned vanilla.
I have made sure that the magnitude of the forces I am applying is non-zero, and have tried using extremely large forces to get them to move, but to no avail. I have set them to not allow sleep, I have tried waking them before applying forces, nothing works.
I'm imagining that there must be some property of the bodies that I am not explicitly setting, so my compiler is assigning it an arbitrary value at runtime, but I don't know what it would be.
I would post code, but I'm not sure which parts are relevant, and it's all within wrapper classes anyway. If anyone has any ideas, I can of course post relevant bits.
Thanks for reading and I appreciate any help you can give!
Hi folks. I have an issue that I just can't seem to sort out. I have a Box2D project that I've been working on for a while and up until now all my bodies, fixtures, joints, etc., have behaved as I would have expected. Now, I have created two bodies and sometimes when I run my program, they will not move, no matter the size of the force applied to them.
Other times I run my program and they work great, responding to all the forces and impulses that I apply to them.
I for the life of me cannot figure out why this is. I create the bodies in very typical Box2D form, they aren't terribly big, no out of the ordinary values for friction, density, etc. They each have one, non-sensor fixture. They have no joints attached to them. They are pretty darned vanilla.
I have made sure that the magnitude of the forces I am applying is non-zero, and have tried using extremely large forces to get them to move, but to no avail. I have set them to not allow sleep, I have tried waking them before applying forces, nothing works.
I'm imagining that there must be some property of the bodies that I am not explicitly setting, so my compiler is assigning it an arbitrary value at runtime, but I don't know what it would be.
I would post code, but I'm not sure which parts are relevant, and it's all within wrapper classes anyway. If anyone has any ideas, I can of course post relevant bits.
Thanks for reading and I appreciate any help you can give!