Difference between revisions of "VEHICLE TYPE AIRPLANE"

From Second Life Wiki
Jump to navigation Jump to search
(New page: {{LSL Constant |name={{PAGENAMEE}} |type=integer |value=3 |desc=Uses linear deflection for lift, no hover, and banking to turn. <pre> // very little friction along forward-back axis llSetV...)
 
(Swapped the <lsl> tags to <source> tags so the example code displays properly.)
 
(9 intermediate revisions by 5 users not shown)
Line 2: Line 2:
|name={{PAGENAMEE}}
|name={{PAGENAMEE}}
|type=integer
|type=integer
|value=3
|value=4
|examples
|desc=Uses linear deflection for lift, no hover, and banking to turn.
|desc=Uses linear deflection for lift, no hover, and banking to turn.
<pre>
 
===Effects===
Setting the vehicle type to airplane enables the vehicle system and additionally has the same effect of executing the following:
<source lang="lsl2">
// very little friction along forward-back axis
// very little friction along forward-back axis
llSetVehicleVectorParam( VEHICLE_LINEAR_FRICTION_TIMESCALE, <200, 10, 5> );
llSetVehicleVectorParam( VEHICLE_LINEAR_FRICTION_TIMESCALE, <200, 10, 5> );
Line 46: Line 50:
// set these flags
// set these flags
llSetVehicleFlags( VEHICLE_FLAG_LIMIT_ROLL_ONLY );
llSetVehicleFlags( VEHICLE_FLAG_LIMIT_ROLL_ONLY );
</pre>
</source>
|examples
|constants={{!}} {{LSL Constants/Vehicle Types}}
|constants=| {{LSL Constants/Vehicle Types}}
|functions={{LSL DefineRow||[[llSetVehicleType]]}}
|functions={{LSL DefineRow||[[llSetVehicleType]]}}
|events
|events
|articles
|articles
|cat1=Vehicle
|cat1=Vehicle/Types
|cat2
|cat2
|cat3
|cat3
|cat4
|cat4
}}
}}

Latest revision as of 15:39, 23 January 2015

Description

Constant: integer VEHICLE_TYPE_AIRPLANE = 4;

The integer constant VEHICLE_TYPE_AIRPLANE has the value 4

Uses linear deflection for lift, no hover, and banking to turn.

Effects

Setting the vehicle type to airplane enables the vehicle system and additionally has the same effect of executing the following:

// very little friction along forward-back axis
llSetVehicleVectorParam( VEHICLE_LINEAR_FRICTION_TIMESCALE, <200, 10, 5> );
// uniform angular friction
llSetVehicleFloatParam( VEHICLE_ANGULAR_FRICTION_TIMESCALE, 20 );
// linear motor
llSetVehicleVectorParam( VEHICLE_LINEAR_MOTOR_DIRECTION, <0, 0, 0> );
llSetVehicleFloatParam( VEHICLE_LINEAR_MOTOR_TIMESCALE, 2 );
llSetVehicleFloatParam( VEHICLE_LINEAR_MOTOR_DECAY_TIMESCALE, 60 );
// agular motor
llSetVehicleVectorParam( VEHICLE_ANGULAR_MOTOR_DIRECTION, <0, 0, 0> );
llSetVehicleFloatParam( VEHICLE_ANGULAR_MOTOR_TIMESCALE, 4 );
llSetVehicleFloatParam( VEHICLE_ANGULAR_MOTOR_DECAY_TIMESCALE, 8 );
// no hover
llSetVehicleFloatParam( VEHICLE_HOVER_HEIGHT, 0 );
llSetVehicleFloatParam( VEHICLE_HOVER_EFFICIENCY, 0.5 );
llSetVehicleFloatParam( VEHICLE_HOVER_TIMESCALE, 1000 );
llSetVehicleFloatParam( VEHICLE_BUOYANCY, 0 );
// linear deflection
llSetVehicleFloatParam( VEHICLE_LINEAR_DEFLECTION_EFFICIENCY, 0.5 );
llSetVehicleFloatParam( VEHICLE_LINEAR_DEFLECTION_TIMESCALE, 0.5 );
// angular deflection
llSetVehicleFloatParam( VEHICLE_ANGULAR_DEFLECTION_EFFICIENCY, 1.0 );
llSetVehicleFloatParam( VEHICLE_ANGULAR_DEFLECTION_TIMESCALE, 2.0 );
// vertical attractor
llSetVehicleFloatParam( VEHICLE_VERTICAL_ATTRACTION_EFFICIENCY, 0.9 );
llSetVehicleFloatParam( VEHICLE_VERTICAL_ATTRACTION_TIMESCALE, 2 );
// banking
llSetVehicleFloatParam( VEHICLE_BANKING_EFFICIENCY, 1 );
llSetVehicleFloatParam( VEHICLE_BANKING_MIX, 0.7 );
llSetVehicleFloatParam( VEHICLE_BANKING_TIMESCALE, 2 );
// default rotation of local frame
llSetVehicleRotationParam( VEHICLE_REFERENCE_FRAME, <0, 0, 0, 1> );
// remove these flags
llRemoveVehicleFlags( VEHICLE_FLAG_NO_DEFLECTION_UP
    | VEHICLE_FLAG_HOVER_WATER_ONLY
    | VEHICLE_FLAG_HOVER_TERRAIN_ONLY
    | VEHICLE_FLAG_HOVER_GLOBAL_HEIGHT
    | VEHICLE_FLAG_HOVER_UP_ONLY
    | VEHICLE_FLAG_LIMIT_MOTOR_UP );
// set these flags
llSetVehicleFlags( VEHICLE_FLAG_LIMIT_ROLL_ONLY );

Related Articles

Constants

Flags Description
VEHICLE_TYPE_NONE 0 Turns off vehicle support
VEHICLE_TYPE_SLED 1 Simple vehicle that bumps along the ground, and likes to move along its local x-axis
VEHICLE_TYPE_CAR 2 Vehicle that bounces along the ground but needs the motors to be driven from external controls or timer events
VEHICLE_TYPE_BOAT 3 Hovers over water with lots of friction and some angular deflection
VEHICLE_TYPE_AIRPLANE 4 Uses linear deflection for lift, no hover, and banking to turn
VEHICLE_TYPE_BALLOON 5 Hover, and friction, but no deflection

Functions

•  llSetVehicleType

Deep Notes

Search JIRA for related Issues

Signature

integer VEHICLE_TYPE_AIRPLANE = 4;