Crouching causes your avatar to slide around
tracked
Jasdac Stockholm
Basically. Crouch, then turn around (or briefly tap a movement key), and your avatar will often start drifting. AFAIK, this is an issue with server physics, hence posting it in server.
Players in our games are currently forced to manage this random drift by pressing the arrow keys while crouching behind cover, which is very annoying. This issue has always been present for as long as I can remember.
Granted, it's a minor annoyance, but I figured you should at least be aware of it.
Log In
Maestro Linden
marked this post as
tracked
Maestro Linden
Hi Jasdac Stockholm, thanks for the report. I think I can reproduce this - it seems that the friction of the avatar against the ground is a bit lower when crouching, such that a "long tap" (~200ms movement keypress?) causes them to slide a bit longer than they would if standing. I see it at 0:20 in this video: https://youtu.be/yax-3pH_Le8
Here's my repro script - which isn't necessary for the bug, but helpfully indicates which keys are pressed and how far the avatar has 'drifted' since they first crouched:
vector RefPos;
rotation RefRot;
default
{
attach(key id)
{
if(id != NULL_KEY) llResetScript();
}
state_entry()
{
llRequestPermissions(llGetOwner(), PERMISSION_TAKE_CONTROLS);
}
run_time_permissions(integer p)
{
if(!p)
{
llOwnerSay("permissions request failed!");
return;
}
llTakeControls(CONTROL_DOWN | CONTROL_FWD | CONTROL_LEFT | CONTROL_RIGHT
| CONTROL_ROT_LEFT | CONTROL_ROT_RIGHT, TRUE, TRUE);
}
control(key agent, integer level, integer edge)
{
if(level & edge & CONTROL_DOWN)
{
// sample reference transform when crouch button pressed
RefPos = llGetPos();
RefRot = llGetRot();
llSetTimerEvent(0.1);
}
else if(edge & CONTROL_DOWN)
{
llSetText("released", <1,1,1>, 1);
llSetTimerEvent(0);
}
// show input on 2nd prim
list pressed;
if(level & CONTROL_DOWN) pressed += ["DOWN"];
if(level & CONTROL_FWD) pressed += ["FWD"];
if(level & CONTROL_BACK) pressed += ["BACK"];
if(level & CONTROL_LEFT) pressed += ["LEFT"];
if(level & CONTROL_RIGHT) pressed += ["RIGHT"];
if(level & CONTROL_ROT_LEFT) pressed += ["ROT_LEFT"];
if(level & CONTROL_ROT_RIGHT) pressed += ["ROT_RIGHT"];
llSetLinkPrimitiveParamsFast(2, [PRIM_TEXT, llList2CSV(pressed), <1,1,1>, 1]);
}
timer()
{
llSetText("Pos Drift = " + (string)((llGetPos() - RefPos)/RefRot)
+ "\nRot Drift (degree) = " + (string)(llAngleBetween(RefRot, llGetRot()) * RAD_TO_DEG),
<1,1,1>, 1);
}
}