Jump to content

SetTextureAnim NONLOOP TWO_PI issue


0xLillithx0
 Share

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

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

Recommended Posts

Hey Guyz,

 

Don't know if anyone else has had this, although I can't see it being widely used in LSL Scripting.

Using llSetTextureAnim / llSetLinkTextureAnim (Which ever you prefer) when using the flags;

ANIM_ON|SMOOTH|ROTATE ~ It's length doesn't respond to radians correctly.

Example;

llSetTextureAnim(ANIM_ON|SMOOTH|ROTATE, 0, 0, 0, 0, TWO_PI, 1);

This won't execute a full 360 rotation, which obviously results in replacing TWO_PI with;

degree's * DEG_TO_RAD

not correctly ending achieving the degree's before the anim ends.

 

Unless I've missed something but be interesting to hear from anyone on it.

 

Thankoooz ^~^

Lillith

Link to comment
Share on other sites

Just expiramentally testing, it seems for non-looped animations the rotation is off by 1 radian

float degrees = 120;
default
{
    state_entry()
    {
        llSetTextureAnim(0, 0, 0, 0, 0, 0, 0);
        llSetTexture("b2d5eb75-b4bf-7763-28dc-d46a03f8e992",0);
        //llSetTexture("571d44bb-8e5f-a579-eaec-cdb0bd109b29",0);
    }
    touch_start(integer total_number)
    {
        llSetTextureAnim(ANIM_ON|SMOOTH|ROTATE, 0, 1, 1, 0, (degrees*DEG_TO_RAD)+1.0, 0.5); 
    }
}

 

  • Thanks 1
Link to comment
Share on other sites

1 minute ago, Quistess Alpha said:

Just expiramentally testing, it seems for non-looped animations the rotation is off by 1 radian

float degrees = 120;
default
{
    state_entry()
    {
        llSetTextureAnim(0, 0, 0, 0, 0, 0, 0);
        llSetTexture("b2d5eb75-b4bf-7763-28dc-d46a03f8e992",0);
        //llSetTexture("571d44bb-8e5f-a579-eaec-cdb0bd109b29",0);
    }
    touch_start(integer total_number)
    {
        llSetTextureAnim(ANIM_ON|SMOOTH|ROTATE, 0, 1, 1, 0, (degrees*DEG_TO_RAD)+1.0, 0.5); 
    }
}

 

♥♥

Very well investigated there ^~^ Thank you!

Link to comment
Share on other sites

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