llDetectedVel
function
Function syntax
vector llDetectedVel(integer number// Index of the detection information.
);- Returns
vector- Energy
- 10
Returns the vector velocity of the detected object or avatar specified by number, or <0.0, 0.0, 0.0> if number is not a valid offset index.
Returns <0.0, 0.0, 0.0> if number is not valid sensed object or avatar.
vector result = llDetectedVel(0);Examples
Section titled “Examples”Example 1
11 collapsed lines
//Tells the name and velocity of all near-by avatars.default{ state_entry() { // Scan once for avatars within a 96 metre radius sphere llSensor("", "", AGENT, 96, PI); } sensor(integer num) { // num will initially be 1 or more. When num is 1, the index of the detected avatar will be zero while(num--) { llOwnerSay(llDetectedName(num) + " is moving at " + (string)llVecMag(llDetectedVel(num)) + " m/s."); } }}Known issues
Section titled “Known issues”From the issue templates included by the wiki article:
- SVC-5821 (bug): Velocity is reduced to maximum of 200.0m/s on instant of collision and llDetectedVel reports this incorrect value.
Original wiki source
Some wiki templates and tables need their original context. View this article on the Second Life Wiki. Technical wording and examples are retained from the source; historical guidance may differ from current behavior.