Unexpected KFM_PING_PONG behavior.
needs info
Raime Crisp
llSetKeyframedMotion([<-0.090044, -0.109650, 0.764997, 0.628211>,5,<-0.087154, -0.151111, 0.378011, 0.909218>,5],[KFM_DATA,KFM_ROTATION,KFM_MODE,KFM_PING_PONG]);
Does not produce the same result as:
llSetKeyframedMotion([ZERO_VECTOR, <-0.090044, -0.109650, 0.764997, 0.628211>,5,ZERO_VECTOR,<-0.087154, -0.151111, 0.378011, 0.909218>,5],[KFM_MODE,KFM_PING_PONG]);
KFM_FORWARD, KFM_REVERSE, and KFM_LOOP all behave the same in this comparison. The deviation seems isolated to KFM_PING_PONG. I haven't figured out if one is correct and the other is not, or if both are broken.
Log In
Maestro Linden
marked this post as
needs info
Maestro Linden
Hi Raime Crisp, can you share more details about what you're seeing differently based the KFM_DATA setting?
On a Second Life Preflight 2026-03-04.22660319648 simulator, I set up 4 objects with this script:
integer ROTATION_DATA_ONLY = FALSE;
default
{
state_entry()
{
llSetPrimitiveParams([PRIM_PHYSICS_SHAPE_TYPE, PRIM_PHYSICS_SHAPE_CONVEX]);
llSetText("KFM test with ROTATION_DATA_ONLY = " + (string)ROTATION_DATA_ONLY, <1,1,1>, 1);
llListen(0, "", llGetOwner(), "");
}
listen(integer channel, string name, key id, string msg)
{
if(msg == "start")
{
if(ROTATION_DATA_ONLY)
{
llSetKeyframedMotion([<-0.090044, -0.109650, 0.764997, 0.628211>, 5, <-0.087154, -0.151111, 0.378011, 0.909218>, 5],
[KFM_DATA, KFM_ROTATION, KFM_MODE, KFM_PING_PONG]);
}
else
{
/*
llSetKeyframedMotion([ZERO_VECTOR, <-0.090044, -0.109650, 0.764997, 0.628211>, 5, ZERO_VECTOR, <-0.087154, -0.151111, 0.378011, 0.909218>, 5],
[KFM_DATA, KFM_ROTATION | KFM_TRANSLATION, KFM_MODE, KFM_PING_PONG]);
*/
llSetKeyframedMotion([ZERO_VECTOR, <-0.090044, -0.109650, 0.764997, 0.628211>, 5, ZERO_VECTOR, <-0.087154, -0.151111, 0.378011, 0.909218>, 5],
[KFM_MODE, KFM_PING_PONG]);
}
}
else if(msg == "stop")
{
llSetKeyframedMotion([], [KFM_COMMAND, KFM_CMD_STOP]);
llSetRot(ZERO_ROTATION);
}
}
}
2 objects were set to ROTATION_DATA_ONLY = TRUE, while the other 2 had it set to FALSE. The configuration is labeled by floating text. For the FALSE case, I tried both omitting KFM_DATA and setting it to KFM_ROTATION | KFM_TRANSLATION.
Here's what I observed: https://youtu.be/_EhqmTcY7As
Sometimes there is some apparent difference between the objects (such as the 2 lower objects pausing at 0:19), but this transcends the KFM_DATA state. I didn't see any difference for the objects that with ROTATION_DATA_ONLY = TRUE vs FALSE.
Maestro Linden
I filed an internal issue about the unexpected pausing my video shows around 0:18, but I'm not seeing any evidence that it's tied to the presence or absence of the
KFM_DATA
flag. I'd still like any details of how the flag changes behavior with your objects.