|
Archile Azalee
Registered User
Join date: 23 Mar 2009
Posts: 2
|
05-03-2009 10:29
Hi All, I'm a little stuck at the minute with a flight script, basicly the part of when the vehicle stops, it rotates the X & Y to (float)0. Here is what i made assuming it would work, but failed; ********************* rotation current; string vecs; list veclist; string c; string d; setrotor() { current = llGetRot(); vecs = (string)current; veclist = llParseString2List(vecs, [", "], [">"]); c = llList2String(veclist, 2); d = llList2String(veclist, 3); llSetRot(<0.0000, 0.0000, (float)c, (float)d>  ; llSetLocalRot(<0.0000, 0.0000, (float)c, (float)d>  ; llSetPrimitiveParams([PRIM_ROTATION, <0.0000, 0.0000, (float)c, (float)d>]); } ************************ Anyone got any idea's on how to solve this? or know how to solve it? Many Thanks, Archile Azalee. Edit: Reason for all 3 rotation setters was because i was hoping one would work *hehe*
|
|
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
|
05-03-2009 13:54
if I understand what you're doing you want to level it but not change the facing?
//-- too lazy to do the math, but this is what you need to do
vector vVecHeading = llRot2Fwd( llGetRot() ); //-- get the z rotation from the x and y of the heading llSetRot( llEuler2Rot( <0.0, 0.0, calced z rotation goes here> ) );
_____________________
| | . "Cat-Like Typing Detected" | . This post may contain errors in logic, spelling, and | . grammar known to the SL populace to cause confusion | | - Please Use PHP tags when posting scripts/code, Thanks. | - Can't See PHP or URL Tags Correctly? Check Out This Link... | - 
|
|
Archile Azalee
Registered User
Join date: 23 Mar 2009
Posts: 2
|
05-04-2009 01:41
*hm* still can't get it too work, it's a linked object and i think it's only changing the root prim. Thats what i think anyways, and it sucks *hehe* should make it easier and add llSetLinkRot(rotation);
|
|
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
|
05-04-2009 09:36
use llSetLocalRot in the child prim that you need to rotate then, or llSetLinkPrimitiveParams (but be aware of SVC-93 which requires a slight work around)
_____________________
| | . "Cat-Like Typing Detected" | . This post may contain errors in logic, spelling, and | . grammar known to the SL populace to cause confusion | | - Please Use PHP tags when posting scripts/code, Thanks. | - Can't See PHP or URL Tags Correctly? Check Out This Link... | - 
|