Bug in llSetKeyframedMotion

Ask technical support questions about other topics
Post Reply
User avatar
Kayaker Magic
Posts: 354
Joined: Sun Dec 01, 2013 8:40 am
Has thanked: 52 times
Been thanked: 393 times

Bug in llSetKeyframedMotion

Post by Kayaker Magic »

I found a bug in llSetKeyframedMotion yesterday: If you tell llSetKeyframedMotion to move a prim at a speed less than one meter per second, it moves too fast. As a result it gets to the next key frame too soon, then stops and pauses before the next key frame starts. Only the motion of the prim is wrong, the rotation is correctly interpolated the whole time.

I went and tried it out on an OpenSim 0.8.0 dev sandbox on the OSgrid, and the bug exists there also. So I submitted it to OpenSim as a Mantis, #7117. That Mantis includes the following script that demonstrates the problem.

Code: Select all

default
{
    state_entry()
    {
        vector dpos=<1.0,0,0>;
        rotation drot=llEuler2Rot(<0,0,PI/4.0>);
        float step=3.0;
        llSetKeyframedMotion([
            dpos,drot,step,
            -dpos,drot,step],
 [KFM_MODE,KFM_LOOP,KFM_TRANSLATION|KFM_ROTATION]);
    }
} 
This effects the swimming critters that I am importing to Kitely. The larger animals move faster than 1 meters per second, so I never noticed this issue until I started importing smaller fish that move slower.

Why mention this here also? Because my favorite OpenSim Developer (Oren) is more likely to see it here!
These users thanked the author Kayaker Magic for the post (total 4):
Constance PeregrineKeith SelmesMarstol NitelyMin Tigerpaw
User avatar
Oren Hurvitz
Posts: 361
Joined: Sun Dec 23, 2012 8:42 am
Has thanked: 19 times
Been thanked: 500 times
Contact:

Re: Bug in llSetKeyframedMotion

Post by Oren Hurvitz »

I've fixed this case, and it will be included in the next update.

Anyone who uses KeyframeMotion, please check that it still works correctly, in case this change broke anything else. (Only check after tomorrow, Monday 21/4/2014).
These users thanked the author Oren Hurvitz for the post (total 2):
Dundridge DreadlowGraham Mills
User avatar
Kayaker Magic
Posts: 354
Joined: Sun Dec 01, 2013 8:40 am
Has thanked: 52 times
Been thanked: 393 times

Re: Bug in llSetKeyframedMotion

Post by Kayaker Magic »

Thanks Oren! My test program does move slow objects smoothly now.
A long time ago I had a problem with llSetKeyframedMotion on Avination (the first place this function appeared outside SL). As the velocity approached zero, the interpolation failed and the prim started behaving crazy. I was afraid that the "don't move slower than 1 meter per second" was an artificial limit to prevent that old problem. So I tested for the old problem as well, allowing a surfboard to move slower and slower with friction, and the crazy behavior from the old bug did not come back! So everything is is working correctly (at least all the features of llSetKeyframedMotion that I have ever exercised).
User avatar
Oren Hurvitz
Posts: 361
Joined: Sun Dec 23, 2012 8:42 am
Has thanked: 19 times
Been thanked: 500 times
Contact:

Re: Bug in llSetKeyframedMotion

Post by Oren Hurvitz »

Thanks for the update, Kayaker.
Post Reply