Vehicle Physics Question about VEHICLE_ANGULAR_MOTOR_DIRECTI
Posted: Wed Jul 03, 2013 5:16 am
I was wondering if it was normal for the results of setting the angular motor vector to depend upon which direction one is facing.
I have been using a function call (such as the one below) to add thrust to the angular motor in my fledgling vehicle.
llSetVehicleVectorParam(VEHICLE_ANGULAR_MOTOR_DIRECTION, angular_motor);
What I have found is the if my vehicle is facing parallel to the world X-axis, then behaviour is as one would expect.
However, if I turn the vehicle -X direction, then when I press the right arrow to bank for a right turn, the vehicle banks left. etc. Basically X and Y thrusts behave backwards.
In SL it does not appear to matter which direction the vehicle faces.
Is this a bug, or am I supposed to be normalizing all my thrust calculations based on current vehicle rotation in the world?
Or, perhaps there is a flag that I was supposed to set that tells the physics engine to use local coordinates?
I have been using a function call (such as the one below) to add thrust to the angular motor in my fledgling vehicle.
llSetVehicleVectorParam(VEHICLE_ANGULAR_MOTOR_DIRECTION, angular_motor);
What I have found is the if my vehicle is facing parallel to the world X-axis, then behaviour is as one would expect.
However, if I turn the vehicle -X direction, then when I press the right arrow to bank for a right turn, the vehicle banks left. etc. Basically X and Y thrusts behave backwards.
In SL it does not appear to matter which direction the vehicle faces.
Is this a bug, or am I supposed to be normalizing all my thrust calculations based on current vehicle rotation in the world?
Or, perhaps there is a flag that I was supposed to set that tells the physics engine to use local coordinates?