Jump to content

How to make the vehicle using this helicopter script turns faster?


lucagrabacr
 Share

You are about to reply to a thread that has been inactive for 3547 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

Hello guys, it's me again with my kinda noobish questions (sorry!) :matte-motes-big-grin:

 

So, I managed to put a motorcycle-seat animation in the script, but I haven't been able to make the vehicle turns faster. Anyone knows how to achieve that? This is the script I'm using: http://www.free-lsl-scripts.com/lib/Helicopter/Helicopter/Object/Helicopter_1.lsl

 

I've tried editing some of the numbers that I thought would make it turns faster (or slower!) but haven't been able to do it so far, Any help will be appreciated! :)

Link to comment
Share on other sites

Vehicle types vary in functionality.  You're using airplane.  Look at the descriptions below:

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

The airplane vehicle type uses linear deflection for lift and banking to turn.  Because of the lift generated by linear deflection, turning is much slower.  You can mitigate this somewhat with the angular, banking and vertical attraction settings, but you may not get the desired results no matter what your settings are, because of its inherent nature to want to lift.  If true airplane feel isn't a priority, I suggest using the balloon type instead, which has no lift.  It's possible to get a very tight turning and responsive airborne vehicle with balloon.

By the way, the wiki linked to earlier explains this behavior:

 

Linear and Angular Deflection

A common feature of real vehicles is their tendency to move along "preferred axes of motion". That is, due to their wheels, wings, shape, or method of propulsion they tend to push or redirect themselves along axes that are static in the vehicle's local frame. This general feature defines a class of vehicles and included in this category a common dart is a "vehicle": it has fins in the back such that if it were to tumble in the air it would eventually align itself to move point-forward--we call this alignment effect "angular deflection".

A wheeled craft exhibits a different effect: when a skateboard is pushed in some direction it will tend to redirect the resultant motion along the direction in which it is free to roll--we call this effect "linear deflection".

So, a typical Second Life vehicle is an object that exhibits linear and/or angular deflection along the "preferential axes of motion". The default preferential axes of motion are the local x- (at), y- (left), and z- (up) axes of the local frame of the vehicle's root primitive. The deflection behaviors relate to the x-axis (at): linear deflection will tend to rotate its velocity until it points along its positive local x-axis while the angular deflection will tend to reorient the vehicle such that its x-axis points in the direction that it is moving. The other axes are relevant to vehicle behaviors that are described later, such as the vertical attractor which tries to keep a vehicle's local z-axis pointed toward the world z-axis (up). The vehicle axes can be rotated relative to the object's actual local axes by using the VEHICLE_REFERENCE_FRAME parameter, however that is an advanced feature and is covered in detail in a later section of these documents.

Depending on the vehicle it may or may not be desirable to have lots of linear and/or angular deflection. The speed of the deflections is controlled by setting the relevant parameters using the llSetVehicleFloatParam script call.

Each variety of deflection has a "timescale" parameter that determines how quickly a full deflection happens.

Basically the timescale is the time coefficient for exponential decay toward full deflection. In other words, a vehicle with a small timescale will deflect quickly. For instance, a typical dart might have an angular deflection timescale of a couple of seconds but a linear deflection of several seconds; it will tend to reorient itself before it changes direction. To set the deflection timescales of a dart you might use the lines below:

llSetVehicleFloatParam(VEHICLE_ANGULAR_DEFLECTION_TIMESCALE, 2.0);
llSetVehicleFloatParam(VEHICLE_LINEAR_DEFLECTION_TIMESCALE, 6.0);

Each variety of deflection has an "efficiency" parameter that is a slider between 0.0 and 1.0. Unlike the other efficiency parameter of other vehicle behaviors, the deflection efficiencies do not slide between "bouncy" and "damped", but instead slide from "no deflection whatsoever" (0.0) to "maximum deflection" (1.0). That is, they behave much like the deflection timescales, however they are normalized to the range between 0.0 and 1.0.

 

You'll find further details in the subsequent sections titled Moving the Vehicle, Steering the Vehicle, The Vertical Attractor, Banking and Friction Timescales

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 3547 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...