Unofficial LSL Reference

[[functions:llapplyimpulse]]


Unofficial LSL reference

User Tools

Login

You are currently not logged in! Enter your authentication credentials below to log in. You need to have cookies enabled to log in.

Login

Forgotten your password? Get a new one: Set new password

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

functions:llapplyimpulse [2015-07-10 04:09 SLT]
sei more style, still lacking
functions:llapplyimpulse [2015-09-22 19:54 SLT] (current)
sei style
Line 11: Line 11:
  
 === impulse === === impulse ===
-A [[types/vector]] specifying the impulse to apply. Impulse is expressed in units of $lart[lindogram|lindograms]·m/​s. For example, in absence of other effects such as gravity or friction, applying an impulse vector of `<1, 0, 0> to an object with a mass of 1.25 $art[lindograms] will add a velocity of 0.8 m/s in the given direction (applied according to the **local** parameter).+$lty[vector] specifying the impulse to apply. Impulse is expressed in units of $lart[lindogram|lindograms]·m/​s. For example, in absence of other effects such as gravity or friction, applying an impulse vector of `<1, 0, 0> to an object with a mass of 1.25 $art[lindograms] will add a velocity of 0.8 m/s in the given direction (applied according to the $prm[localparameter).
  
 === local === === local ===
-[[types/Boolean]] value indicating whether the **impulse** vector applies its effect in coordinates local to the root prim or avatar (if [[constants/TRUE]]) or in sim coordinates (if [[constants/FALSE]]).+$lty[Boolean] value indicating whether the $prm[impulsevector applies its effect in coordinates local to the root prim or avatar (if $lct[TRUE]) or in sim coordinates (if $lct[FALSE]).
  
-When **TRUE**, the **impulse** vector specifies coordinates local to the root prim. For example, if **impulse** is `<1, 0, 0> and the X axis of the root prim is looking northwest, then the impulse will be applied in the northwest direction, aligned with the root prim's X axis. If it's an attachment, the vector is relative to the avatar'​s orientation.+When $ct[TRUE], the $prm[impulsevector specifies coordinates local to the root prim. For example, if $prm[impulseis `<1, 0, 0> and the X axis of the root prim is looking northwest, then the impulse will be applied in the northwest direction, aligned with the root prim's X axis. If it's an attachment, the vector is relative to the avatar'​s orientation.
  
-When **FALSE**, the vector specifies sim coordinates,​ where positive X is east, positive Y is north, positive Z is up, and vice versa for negative; for example, if **impulse** is `<-1, 0, 0>, the impulse will be applied in the westward direction, no matter how the root prim or the avatar is oriented.+When $ct[FALSE], the vector specifies sim coordinates,​ where positive X is east, positive Y is north, positive Z is up, and vice versa for negative; for example, if $prm[impulseis `<-1, 0, 0>, the impulse will be applied in the westward direction, no matter how the root prim or the avatar is oriented.
  
 ===== Notes ===== ===== Notes =====
  
-  * To change the velocity of the object by a given amount, multiply the desired velocity difference by its [[llGetMass|mass in Lindograms]] (see example below). +  * To change the velocity of the object by a given amount, multiply the desired velocity difference by its $lfn[llGetMass|mass in Lindograms] (see example below). 
-  * The maximum speed (magnitude of the velocity vector) of an object seems to be limited to 202.8125 m/s, although the value measured by [[llGetVel]] can be greater for an instant before it is actually applied. The value returned by **llGetVel** seems to be limited to a magnitude of 250 m/s.+  * The maximum speed (magnitude of the velocity vector) of an object seems to be limited to 202.8125 m/s, although the value measured by $lfn[llGetVel] can be greater for an instant before it is actually applied. The value returned by $fn[llGetVelseems to be limited to a magnitude of 250 m/s.
   * FIXME: official wiki says total momentum has a cap too. Test.   * FIXME: official wiki says total momentum has a cap too. Test.
  
Line 37: Line 37:
 ===== See also ===== ===== See also =====
  
-  * [[llApplyRotationalImpulse]] is the same but for [[http://​en.wikipedia.org/​wiki/​Angular_momentum|angular momentum]] instead of linear. +  * $lfn[llApplyRotationalImpulse] is the same but for [[http://​en.wikipedia.org/​wiki/​Angular_momentum|angular momentum]] instead of linear. 
-  * [[llSetForce]] applies a force to an object continuously. +  * $lfn[llSetForce] applies a force to an object continuously. 
-  * [[llSetTorque]] is the angular equivalent to **llSetForce**+  * $lfn[llSetTorque] is the angular equivalent to $fn[llSetForce]
-  * [[llSetForceAndTorque]] sets both force and torque at the same time. +  * $lfn[llSetForceAndTorque] sets both force and torque at the same time. 
-  * [[llSetVelocity]] applies the necessary impulse to an object for its velocity to match the given value. +  * $lfn[llSetVelocity] applies the necessary impulse to an object for its velocity to match the given value. 
-  * [[llGetVel]] returns the current velocity of the object. +  * $lfn[llGetVel] returns the current velocity of the object. 
-  * [[llSetAngularVelocity]] and [[llGetOmega]] are the angular equivalents of **llSetVelocity/​llGetVel**+  * $lfn[llSetAngularVelocity] and $lfn[llGetOmega] are the angular equivalents of $fn[llSetVelocity]/$fn[llGetVel]
-  * [[llGetMass]] returns the mass in $lart[lindogram|Lindograms] of an object. +  * $lfn[llGetMass] returns the mass in $lart[lindogram|Lindograms] of an object. 
-  * [[llGetMassMKS]] returns the mass in kilograms of an object. Most LSL functions use $art[Lindograms],​ so this function is of limited use in physics calculations.+  * $lfn[llGetMassMKS] returns the mass in kilograms of an object. Most LSL functions use $art[Lindograms],​ so this function is of limited use in physics calculations.