Jump to content

Airplanes Can't Tilt?

Recommended Posts

so i'm tinkering with this full perm helicopter script.  it banks when it turns, but when it flies straight forward/back, it flies level.  unlike a real helicopter, which has to tilt forward to fly forward, etc.


so i thought i'd make it tilt forward as it flew.  is that not actually possible with VEHICLE_TYPE_AIRPLANE?


i tired this:

        rotation rot = llEuler2Rot(<0., throttle*15., 0.>*DEG_TO_RAD);
        //--local rot is your rotation * global rotation (llGetRot)
       llSetRot(rot * llGetRot());

which had zero effect on the object's rotation, whether the throttle was 0, 1, 2, etc.


then i tried this, which honestly i have no idea what it is (the wiki page wasn't very forthcoming):


llSetVehicleRotationParam( VEHICLE_REFERENCE_FRAME, rot * llGetRootRotation());

though the wiki page says to use rot / llGetRootRotation, which i don't understand.


i THINK (judging by how the helicopter behaves while i'm running this command) that it only changes the object's local axis coordinate system, somehow.

if it CAN set the vehicle's reference frame so that 'forward' is 15 degrees up from where it used to be, while the actual object is tilted 15 degrees down... that would be what i want, i think?  oh, i guess this changes the imaginary reference frame of the object, but not the object itself.  :/


well, trying to do both resulted in the same stupid as before.  reference frame changed, helicopter didn't rotate.


Link to comment
Share on other sites

Vehicles are generally better behaved the less they use non-vehicle adjustments to motion. There are exceptions, but the vehicle API has pretty effective and complete banking parameters, so maybe consult the relevant section of the Linden vehicle tutorial, if that's not already in the script. (This may well entail some changes to the vehicle script's control section, too.)

EDIT: Ah, I see it is already using banking, sorry, forget all that. So yeah, you should be able to tilt the reference frame so it wants to fly pitched downward, but I don't recall ever changing that parameter in an already-moving vehicle. And it kinda would need to change because otherwise it won't want to be level when going up and down or hovering.

Edited by Qie Niangao
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...