Difference between revisions of "LlApplyImpulse/fr"

From Second Life Wiki
Jump to navigation Jump to search
(Localized to french)
 
m (Big proofreading)
Line 7: Line 7:
|p2_type=integer
|p2_type=integer
|p2_name=local
|p2_name=local
|p2_desc=boolean, si[[TRUE/fr|TRUE]], La '''force''' est considérée comme i, vector dans un référentiel [[Viewer coordinate frames/fr#Local|local]] au lieu d'un référentiel [[Viewer coordinate frames/fr#Region|régional]].
|p2_desc=boolean, si[[TRUE/fr|TRUE]], La '''force''' est considérée comme un vecteur dans un référentiel [[Viewer coordinate frames/fr#Local|local]] au lieu d'un référentiel [[Viewer coordinate frames/fr#Region|régional]].
|func_desc=Applique une impulsion à l'objet
|func_desc=Applique une impulsion à l'objet
|return_text|spec
|return_text|spec
Line 13: Line 13:
|examples=
|examples=
<lsl>
<lsl>
//Rezzez un objet et mettez le script dedans.
// Rezzez un objet et mettez le script dedans.
default {
// Cela le lancera au propriétaire
    state_entry() {
default
          list p = llGetObjectDetails(llGetOwner(), [OBJECT_POS]);
{
          if(p != []) {
  state_entry()
              llSetStatus(STATUS_PHYSICS, TRUE);
  {
              vector pos = llList2Vector(p, 0);
      list p = llGetObjectDetails(llGetOwner(), [OBJECT_POS]);
              vector direction = llVecNorm(pos - llGetPos());
      if (p != [])
              llApplyImpulse(direction * 100, 0);
      {
          }
        llSetStatus(STATUS_PHYSICS, TRUE);
    }
        vector pos = llList2Vector(p, 0);
        vector direction = llVecNorm(pos - llGetPos());
        llApplyImpulse(direction * 100, 0);
      }
  }
}
}
</lsl>
</lsl>
|helpers
|helpers
|also_functions={{LSL DefineRow||[[llApplyRotationalImpulse/fr|llApplyRotationalImpulse]]|applique une mouvement rotatif à un objet}}
|also_functions=
{{LSL DefineRow||[[llApplyRotationalImpulse]]|}}
{{LSL DefineRow||[[llSetForce]]|Applique une force continue}}
|notes
|notes
|cat1=Physics/fr
|cat1=Physics/fr

Revision as of 07:12, 5 April 2008

Description

Fonction: llApplyImpulse( vector force, integer local );

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.

Avertissements

  • L'objet doit être physique.

Exemples

<lsl> // 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);
     }
  }

} </lsl>

Voir également

Fonctions

•  llApplyRotationalImpulse
•  llSetForce Applique une force continue
Vous cherchez encore des informations ? Peut-être cette page du LSLwiki pourra vous renseigner.