Confusion over axis?

Post Reply
Brian Beuken
Posts: 46
Joined: Sat Jul 29, 2017 9:19 pm

Confusion over axis?

Post by Brian Beuken »

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?
Attachments
snapshot.png
snapshot.png (205.01 KiB) Viewed 2656 times
Brian Beuken
Posts: 46
Joined: Sat Jul 29, 2017 9:19 pm

Re: Confusion over axis?

Post by Brian Beuken »

oops I just found out, I'd rotated my ground plane 90 degs in error when I constructed it with a faulty default quat value.

nothing to see here, fat old man making mistakes, and saying hello in the process.
Post Reply