Jump to content

objects remote movement and rotation


Elphida
 Share

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

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

Recommended Posts

Hi all

I have a problem, I want to use 

        llSetLinkPrimitiveParamsFast(1, [PRIM_LINK_TARGET, 2, PRIM_ROT_LOCAL, r]);

and I send information from teh main to the other with 

        string cmd = (string)angle; 
         
        float time_delay = 0.01;
        
        llMessageLinked(LINK_ALL_OTHERS, 0, cmd, NULL_KEY);      
        
        llSetTimerEvent(time_delay);

to move parts

I use 

vector axis = <1,0,0>;
vector pos=<0,2,0>;
float angle;
default
{
    state_entry()
    {
        llSetPos(pos);
    }

    link_message(integer sender_num, integer num, string cmd, key id)
    {
        angle = (float)cmd*DEG_TO_RAD;
        axis = axis+<angle,0,0>;
        llSetLinkPrimitiveParamsFast(2,[PRIM_ROTATION, llEuler2Rot(axis)*llGetRot()]) ;     
    }
}

however, nothing move...

can I get help understand what I do wrong here?

thanks

EL

 

Link to comment
Share on other sites

13 minutes ago, Elphida said:

no, it is 10.0

Works just fine. Maybe you're not sending messages correctly?

default
{
    state_entry()
    {
        while (TRUE) {
            llMessageLinked(LINK_ALL_OTHERS, 0, (string)10, "");
            llSleep(0.2);
        }
    }
}
vector axis = <1,0,0>;
float angle;

default
{
    link_message(integer sender_num, integer num, string cmd, key id)
    {
        angle = (float)cmd * DEG_TO_RAD;
        axis = axis + <angle,0,0>;
        llSetLinkPrimitiveParamsFast(2,[PRIM_ROTATION, llEuler2Rot(axis)*llGetRot()]) ;
    }
}

 

Edited by Wulfie Reanimator
  • Like 1
Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 86 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...