Vehicle Physics Question about VEHICLE_ANGULAR_MOTOR_DIRECTI

Creating scripts
Post Reply
User avatar
Xxaxx Constantine
Posts: 19
Joined: Sat May 18, 2013 3:25 am
Has thanked: 7 times
Been thanked: 4 times

Vehicle Physics Question about VEHICLE_ANGULAR_MOTOR_DIRECTI

Post by Xxaxx Constantine »

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?
These users thanked the author Xxaxx Constantine for the post (total 2):
June NarielBurning Angel
User avatar
June Nariel
Posts: 4
Joined: Sun Jun 16, 2013 12:55 am
Has thanked: 44 times
Been thanked: 11 times

Re: Vehicle Physics Question about VEHICLE_ANGULAR_MOTOR_DIR

Post by June Nariel »

Xxaxx Constantine wrote: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?

This is a good question with OS 7.6 out I know most grids stay a release behind due to bug control but 7.5 is bullet ready will kitely turn on bullet physics ? as that might mean a few more changes but from video bullet is cool http://www.youtube.com/watch?v=EwqN9_9kz_Q
These users thanked the author June Nariel for the post:
Burning Angel
User avatar
Ilan Tochner
Posts: 6503
Joined: Sun Dec 23, 2012 8:44 am
Has thanked: 4942 times
Been thanked: 4454 times
Contact:

Re: Vehicle Physics Question about VEHICLE_ANGULAR_MOTOR_DIR

Post by Ilan Tochner »

Hi June,

BulletSim is indeed much better than the ODE physics we currently use but, unfortunately, BulletSim is still not production ready so we can't roll it out on Kitely just yet. Once BulletSim reaches production quality we'll switch to using it.
These users thanked the author Ilan Tochner for the post:
Burning Angel
User avatar
Bri Hasp
Posts: 4
Joined: Wed Dec 25, 2013 12:20 am
Has thanked: 2 times
Been thanked: 1 time

Re: Vehicle Physics Question about VEHICLE_ANGULAR_MOTOR_DIR

Post by Bri Hasp »

ODE is not vehicle friendly as you know.
Post Reply