Difference between revisions of "PRIM ROT LOCAL"
Jump to navigation
Jump to search
m |
m |
||
Line 1: | Line 1: | ||
<onlyinclude>{{#if: | <onlyinclude>{{#if: | ||
{{#vardefine:rot_local_const|{{LSL Const|PRIM_ROT_LOCAL|integer|29|c=Used to {{GetSet|{{{1|}}}|get|set|/}} the prim's local rotation}}}} | {{#vardefine:rot_local_const|{{LSL Const/ja|PRIM_ROT_LOCAL|integer|29|c=Used to {{GetSet|{{{1|}}}|get|set|/}} the prim's local rotation}}}} | ||
{{#vardefine:p_rot_local_desc|Any valid rotation}} | {{#vardefine:p_rot_local_desc|Any valid rotation}} | ||
Line 71: | Line 71: | ||
<!--{{LSL ConstRow|CHANGED_SHAPE}}--> | <!--{{LSL ConstRow|CHANGED_SHAPE}}--> | ||
|functions= | |functions= | ||
{{LSL DefineRow||[[llGetPrimitiveParams]]|}} | {{LSL DefineRow||[[llGetPrimitiveParams/ja]]|}} | ||
{{LSL DefineRow||[[llGetLinkPrimitiveParams]]|}} | {{LSL DefineRow||[[llGetLinkPrimitiveParams/ja]]|}} | ||
{{LSL DefineRow||[[llSetPrimitiveParams]]|}} | {{LSL DefineRow||[[llSetPrimitiveParams/ja]]|}} | ||
{{LSL DefineRow||[[llSetLinkPrimitiveParams]]|}} | {{LSL DefineRow||[[llSetLinkPrimitiveParams/ja]]|}} | ||
{{LSL DefineRow||[[llGetRot]]|}} | {{LSL DefineRow||[[llGetRot/ja]]|}} | ||
{{LSL DefineRow||[[llSetRot]]|}} | {{LSL DefineRow||[[llSetRot/ja]]|}} | ||
{{LSL DefineRow||[[llSetLocalRot]]|}} | {{LSL DefineRow||[[llSetLocalRot/ja]]|}} | ||
{{LSL DefineRow||[[llGetLocalRot]]|}} | {{LSL DefineRow||[[llGetLocalRot/ja]]|}} | ||
{{LSL DefineRow||[[llGetRootRotation]]|}} | {{LSL DefineRow||[[llGetRootRotation/ja]]|}} | ||
{{LSL DefineRow||[[llGetObjectDetails]]|}} | {{LSL DefineRow||[[llGetObjectDetails/ja]]|}} | ||
|events= | |events= | ||
<!--{{LSL DefineRow||[[changed]]|}}--> | <!--{{LSL DefineRow||[[changed/ja]]|}}--> | ||
|location | |location | ||
|cat1 | |cat1 | ||
|cat2=Rotation | |cat2=Rotation/ja | ||
|cat3=Movement | |cat3=Movement/ja | ||
|cat4 | |cat4 | ||
}} | }} |
Latest revision as of 01:06, 8 October 2023
LSL Portal | Functions | Events | Types | Operators | Constants | Flow Control | Script Library | Categorized Library | Tutorials |
Description
Constant: integer PRIM_ROT_LOCAL = 29;The integer constant PRIM_ROT_LOCAL has the value 29
PRIM_ROT_LOCAL is used to get or set the prim's local rotation.
llSetPrimitiveParams
llSetPrimitiveParams([ PRIM_ROT_LOCAL, rotation rot ]);• rotation | rot | – | Any valid rotation |
When used with llSetPrimitiveParams & llSetLinkPrimitiveParams
llGetPrimitiveParams
llGetPrimitiveParams([ PRIM_ROT_LOCAL ]);Caveats
Related Articles
Examples
integer isRotated = FALSE;
vector rotated = <25, 25, 0>;
rotation notRotated = ZERO_ROTATION;
rotation rot;
default
{
state_entry()
{
rotated *= DEG_TO_RAD;
rot = llEuler2Rot( rotated );
}
touch_start(integer total_number)
{
if( isRotated )
{
llSetLinkPrimitiveParams( 2, [PRIM_ROT_LOCAL, notRotated] );
isRotated = FALSE;
}
else if( !isRotated )
{
isRotated = TRUE;
llSetLinkPrimitiveParams( 2, [PRIM_ROT_LOCAL, rot] );
}
}
}