Linden Scripting Language Guide - Engineering Center
Linden Scripting Language Guide - Engineering Center
Linden Scripting Language Guide - Engineering Center
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
Chapter 11. VehiclesVehicles are a new feature now available for use through LSL. This chapter will cover the basics of how vehicleswork, the terms used when describing vehicles, and a more thorough examination of the api available.There are several ways to make scripted objects move themselves around. One way is to turn the object into a"vehicle". This feature is versatile enough to make things that slide, hover, fly, and float. Some of the behaviorsthat can be enabled are:• deflection of linear and angular velocity to preferred axis of motion• asymmetric linear and angular friction• hovering over terrain/water or at a global height• banking on turns• linear and angular motor for push and turning11.1. OverviewEach scripted object can have one vehicle behavior that is configurable through the llSetVehicleType,llSetVehicleFloatParam, llSetVehicleVectorParam, llSetVehicleRotationParam, llSetVehicleFlags, andllRemoveVehicleFlags library calls.These script calls are described in more detail below, but the important thing to notice here is that the vehiclebehavior has several parameters that can be adjusted to change how the vehicle handles. Depending on the valueschosen the vehicle can veer like a boat in water, or ride like a sled on rails.Setting the vehicle flags allow you to make exceptions to some default behaviors. Some of these flags only havean effect when certain behaviors are enabled. For example, the VEHICLE_FLAG_HOVER_WATER_ONLY willmake the vehicle ignore the height of the terrain, however it only makes a difference if the vehicle is hovering.11.2. WarningsVehicles are new in Second Life 1.1 and some of the details of their behavior may be changed as necessary toensure stability and user safety. In particular, many of the limits and defaults described in the appendices willprobably change and should not be relied upon in the long term.It is not recommended that you mix vehicle behavior with some of the other script calls that provide impulse andforces to the object, especially llSetBuoyancy, llSetForce, llSetTorque, and llSetHoverHeight.26