LlApplyImpulse/fr
From Second Life Wiki
| Portail LSL | | | Fonctions | | | Évènements | | | Types | | | Constantes | | | Contrôle d'exécution | | | Bibliothèque de scripts | | | Tutoriels |
Description
Fonction: llApplyImpulse( vector force, integer local );| 72 | N° de fonction |
| 0.0 | Délai |
| 10.0 | Energie |
Applique une impulsion à l'objet
| • vector | force | |||
| • integer | local | – | boolean, siTRUE, La force est considérée comme un vecteur dans un référentiel local au lieu d'un référentiel régional. |
Il s'agit d'une impulsion instantanée. llSetForce exerce une poussée continue.
Exemples
// Rezzez un objet et mettez le script dedans. // Cela le lancera au propriétaire default { state_entry() { list p = llGetObjectDetails(llGetOwner(), [OBJECT_POS]); if (p != []) { llSetStatus(STATUS_PHYSICS, TRUE); vector pos = llList2Vector(p, 0); vector direction = llVecNorm(pos - llGetPos()); llApplyImpulse(direction * 100, 0); } } }

