raycast vehicle - understanding coordinate system
Posted: Tue Feb 12, 2019 8:02 pm
Bullet world space coordinate system is the same as opengl world coordinate system. I have noticed that raycast vehicle has the following function:
How does that function work ?
By default raycast vehicle has the following parametets:
After calling:
I get the following parameters:
Code: Select all
virtual void btRaycastVehicle::setCoordinateSystem(int rightIndex,
int upIndex,
int forwardIndex);
By default raycast vehicle has the following parametets:
- forward vector: [0, 1, 0]
- forward axis: 1
- right axis: 0
- up axis: 2
After calling:
Code: Select all
raycastVehicle.setCoordinateSystem(0,1,2);
- forward vector: [0, 0, 1]
- forward axis: 2
- right axis: 0
- up axis: 1