Confusion over axis?
Posted: Sat Jul 29, 2017 9:35 pm
Hi Sorry to trouble you with a noob question, I just started to use Bullet recently and have had a couple of odd issues.
I added the debug draw code for my OpenGLES2.0 targets, to let me have a look at the boxes I was testing against, and got some odd results.
This Ground plane is defined this way.
PhysicsObj* Ground = this->CreatePhysicsObj(
new btBoxShape( btVector3(0.1f, 24.0f, 111.0f) ), // shape
0, // mass
btVector3(0.0f, 0.0f, 0.0f) // position
);
Which appears to suggest the x value of the BT vector is the 0.1, but it is actually the Y as you can clearly see, the Y itself provding the left to right X width of the plane, which seems suggest I have swapped Y with the X. The Z component appears fine going off to the distance. I don't really understand how this might be.
I'm pretty sure I am drawing them ok (but one must never assume) but I wonder if anyone has seen this before and knows what I might be doing wrong?
I added the debug draw code for my OpenGLES2.0 targets, to let me have a look at the boxes I was testing against, and got some odd results.
This Ground plane is defined this way.
PhysicsObj* Ground = this->CreatePhysicsObj(
new btBoxShape( btVector3(0.1f, 24.0f, 111.0f) ), // shape
0, // mass
btVector3(0.0f, 0.0f, 0.0f) // position
);
Which appears to suggest the x value of the BT vector is the 0.1, but it is actually the Y as you can clearly see, the Y itself provding the left to right X width of the plane, which seems suggest I have swapped Y with the X. The Z component appears fine going off to the distance. I don't really understand how this might be.
I'm pretty sure I am drawing them ok (but one must never assume) but I wonder if anyone has seen this before and knows what I might be doing wrong?