Revolute joint angle
Posted: Tue Jul 09, 2013 8:19 pm
Hi!
First of all thanks for great tutorials and R.U.B.E. tool. I'm still getting started with it, but it looks like a great tool.
One think that I'm strugling with is a starting angle of revolute joint. Here is the situation.
I have bodies (each has 1 fixture, rectangle, in fact they are all clones). I want to build some kind of bouncy tree using them and revolute joints. To do this I place them and connect using revolute joints. Some of them connect ok (at least vertical, main branch of the tree), but when it gets to connecting rotated objects they go crazy when I hit play.
Here is a screenshoot of connecting 2 bodies
https://dl.dropboxusercontent.com/u/394 ... _angle.png
As you can see,
1. Reference angle (green line) is set to 0 and pointing up.
2. Enable Limits is ON
3. Upper & Lower limits (yellow lines) are also 0, but point in absolutely different direction.
This is what I got by selecting bodyA (on the right) then shift-select bodyB (on the left), putting cursor to cross between them, adding revolute joint and enabling limits.
If I hit run, everything goes crazy. If I set reference angle to -152.147 degrees (which is joint angle as you can see in tooltip with info) everything works fine. But I'm a total noob in box2d and in tutorials everyone says that you shouldn't touch reference angle and leave it 0.
What is a proper way to create revolute points in R.U.B.E.? I've watched tutorial (on youtube with A & B letters, but there was no such issue with joint angle).
Thanks in advance for any help.
First of all thanks for great tutorials and R.U.B.E. tool. I'm still getting started with it, but it looks like a great tool.
One think that I'm strugling with is a starting angle of revolute joint. Here is the situation.
I have bodies (each has 1 fixture, rectangle, in fact they are all clones). I want to build some kind of bouncy tree using them and revolute joints. To do this I place them and connect using revolute joints. Some of them connect ok (at least vertical, main branch of the tree), but when it gets to connecting rotated objects they go crazy when I hit play.
Here is a screenshoot of connecting 2 bodies
https://dl.dropboxusercontent.com/u/394 ... _angle.png
As you can see,
1. Reference angle (green line) is set to 0 and pointing up.
2. Enable Limits is ON
3. Upper & Lower limits (yellow lines) are also 0, but point in absolutely different direction.
This is what I got by selecting bodyA (on the right) then shift-select bodyB (on the left), putting cursor to cross between them, adding revolute joint and enabling limits.
If I hit run, everything goes crazy. If I set reference angle to -152.147 degrees (which is joint angle as you can see in tooltip with info) everything works fine. But I'm a total noob in box2d and in tutorials everyone says that you shouldn't touch reference angle and leave it 0.
What is a proper way to create revolute points in R.U.B.E.? I've watched tutorial (on youtube with A & B letters, but there was no such issue with joint angle).
Thanks in advance for any help.