Jump to content

Rotating a child prim on attachment


Poltergeist Azarov
 Share

You are about to reply to a thread that has been inactive for 3407 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

Today when I was playing with a child prim to simulate avatar rotations to it, was fun and succeded. But when I want to do same thing on an attachment, everything seems to be mixed. So a child prim on my gun does not simulate avatars rotation and probably I was wrong with something. Any suggestions? 

Here's the example i made, to simulate avatar rotations to a child prim which is not attached to avatar:

default
{
    state_entry()
    {
        llSetTimerEvent(0.1);
    }
    timer () {
        rotation AgentRot =llList2Rot(llGetObjectDetails(llGetOwner(),[OBJECT_ROT]),0);
        rotation TargetRot=(AgentRot / llGetRootRotation());
        vector x=<270,90,0>*DEG_TO_RAD;
        llSetLinkPrimitiveParamsFast(2,[PRIM_ROT_LOCAL,llEuler2Rot(x)*TargetRot]);
    }
}

 



Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 3407 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...