LlSetLocalRot/fr: Difference between revisions
Jump to navigation
Jump to search
Gally Young (talk | contribs) Localized to french |
proofreading + exemple |
||
| Line 8: | Line 8: | ||
|caveats | |caveats | ||
|constants | |constants | ||
|examples | |examples=Mettre ce script dans un prim fille le fera tourner par pas de 1 degré. | ||
<lsl> | |||
rotation rot_xyzq; | |||
default | |||
{ | |||
state_entry() | |||
{ | |||
vector xyz_angles = <0,1.0,0>; // 1 degre selon l'axe y | |||
vector angles_in_radians = xyz_angles*DEG_TO_RAD; // conversion en Radians | |||
rot_xyzq = llEuler2Rot(angles_in_radians); // passage en Rotation (quaternion) | |||
} | |||
touch_start(integer s) | |||
{ | |||
llSetLocalRot(llGetRot()*rot_xyzq); //effectue la rotation | |||
} | |||
} | |||
</lsl> | |||
|helpers | |helpers | ||
|also_functions= | |also_functions= | ||
Latest revision as of 04:10, 30 September 2008
| LSL Portail Francophone | LSL Portail Anglophone | Fonctions | Évènements | Types | Operateurs | Constantes | Contrôle d'exécution | Bibliothèque | Tutoriels |
Description
Fonction: llSetLocalRot( rotation rot );| 284 | N° de fonction |
| 0.2 | Delais |
| 10.0 | Energie |
Change la rotation d’une prim fille par rapport à une prim racine
| • rotation | rot |
Avertissements
- Cette fonction fait dormir le script pendant 0.2 secondes.
Exemples
Mettre ce script dans un prim fille le fera tourner par pas de 1 degré. <lsl> rotation rot_xyzq;
default {
state_entry()
{
vector xyz_angles = <0,1.0,0>; // 1 degre selon l'axe y
vector angles_in_radians = xyz_angles*DEG_TO_RAD; // conversion en Radians
rot_xyzq = llEuler2Rot(angles_in_radians); // passage en Rotation (quaternion)
}
touch_start(integer s)
{
llSetLocalRot(llGetRot()*rot_xyzq); //effectue la rotation
}
} </lsl>
Voir également
Fonctions
| • | llSetRot | – | Change la rotation | |
| • | llGetRot | – | Renvoie la rotation | |
| • | llGetLocalRot | – | Renvoie la rotation locale | |
| • | llGetRootRotation | – | Renvoie la rotation de la prim racine |
Vous cherchez encore des informations ? Peut-être cette page du LSLwiki pourra vous renseigner.