Revolute Joints problem

Hi,

I am having a slight issue with creating a revolute joint between two bodies. If I set both BodyA and BodyB to be of the same type ie b2_dynamicBody etc then the joint works fine. However I am trying to conect a dynamic body to a static body via a revolute joint. When i do this it doesn't work and freezes the game.

I thought it would be possible to connect these types of bodies to one another. please let me know if I am doing something wrong. I basically want to create a trap door thats hinged and hangs in mid air if that makes sense.

If you could help that would be great.

Cheers
Ok after a bit more debuging i notice when the following lines are present:

jointDef.enableMotor = true;
jointDef.enableLimit = true;

then it breaks however if they are not present then the game runs fine. Ideally I need the joint to have a motor enabled on it so i can control the joint with a motor.
What you are attempting should work fine.

I'm guessing there is a bug in your code. Make sure your variables are in scope and you aren't accessing uninitialized/invalid memory. Try using a debugger and looking at the variables and call stack when the program crashes.
Yeah I thought it should work fine. I will do some more debugging and failing that i will post my code on here. It is an odd one because wheneither of those variables are set to true the object stays in the top left corner and prevents te timestep from running. I will post any findings i may have. I forgot to mention that shape b is a convex shape and shape A is a a static circle and the code is written in AS3. Doubt this would make a huge difference but thought i would mention it.

Cheers

Original thread: https://box2d.org/forum/viewtopic.php?t=5404