Bug Report: Residual Script Effects Preventing Object Movement in Mesh Prims
needs info
DimplesApplePie Spicy
Description:
When placing a scripted object inside a mesh prim, even after disabling all other scripts, the object refuses to move despite having full permissions (including "take control"). The same script works perfectly when placed inside a regular prim (box). This behavior strongly suggests that residual effects from previously running scripts (such as lingering llSitTarget or similar calls) persist within the mesh prim and prevent proper control, even if those scripts are disabled or removed.
Steps to Reproduce:
Place the scripted object inside a mesh prim.
Disable or remove all other scripts in the prim except the movement control script.
Attempt to move or control the object — it fails to respond despite correct permissions and input.
Replace the mesh root prim or rezz a new prim and the same script works correctly.
The issue does not occur if the object is placed in a regular prim (box).
Debug confirms physical presence, permissions, and input detection are correct; however, the object does not move.
Expected Behavior:
Disabling or removing scripts should fully stop any lingering script effects such as llSitTarget or control overrides, allowing the object to move normally under script control.
Actual Behavior:
Residual script effects remain active even after disabling/removing scripts, causing the object to become immobile inside mesh prims unless the root prim is replaced or a new prim is rezzed.
Impact:
This is a critical bug affecting scripted object control and physics within mesh prims, disrupting expected behavior and causing significant development and usage issues.
Additional Notes:
The bug seems specific to mesh prims and does not appear in regular prims.
Replacing the mesh root prim clears the issue temporarily, indicating state persistence at the prim level.
Suspected causes include improper cleanup of llSitTarget or similar functions.
Log In
Maestro Linden
needs info
Maestro Linden
Hi DimplesApplePie Spicy I'm having trouble reproducing this issue with Second Life Release 7.1.15.15596336374 (64bit) on SLS 2025-04-24.14648572313. After placing a vehicle in the inventory of a mesh prim, then rezzing the vehicle in-world, the vehicle is still drivable. Here's what I did:
- Rez a box and name it 'vehicle'
- Place the 'Basic vehicle script' (see child comment) in 'vehicle'
- Sit on 'vehicle' and observe that it is drivable as a car
- Take 'vehicle' into inventory
- Import a basic mesh
- Download the source of https://github.com/KhronosGroup/glTF-Sample-Models/blob/main/sourceModels/Duck/Duck.dae
- In the SL viewer's inventory panel, select '+' -> Upload -> Model
- Import the model using the defaults, except with the name set to 'duck' for clarity
- Rez the duck mesh in-world
- Place 'vehicle' inside the inventory of 'duck'
- Drag 'vehicle' from the inventory 'duck' back into the world to rez it
- Sit on 'vehicle' and attempt to drive it again
In (9), the vehicle is drivable, and basically operates the same as in step (3).
If you're seeing different results, please provide exact instructions for how to reproduce it.
Maestro Linden
// Basic vehicle script
default
{
state_entry()
{
llSetScale(<4,3,1>);
llSetSitText("Ride");
llSitTarget(<0,0,1>, ZERO_ROTATION);
llSetCameraEyeOffset(<-6.0, 0.0, 2.00>);
llSetCameraAtOffset(<0.0, 0.0, 1.0>);
llSetStatus(STATUS_BLOCK_GRAB_OBJECT, TRUE);
llSetVehicleType(VEHICLE_TYPE_CAR);
}
on_rez(integer param)
{
llResetScript();
}
changed(integer change)
{
if (change & CHANGED_LINK)
{
key agent = llAvatarOnSitTarget();
if (agent)
{
llSetStatus(STATUS_PHYSICS, TRUE);
llRequestPermissions(agent, PERMISSION_TRIGGER_ANIMATION | PERMISSION_TAKE_CONTROLS | PERMISSION_CONTROL_CAMERA);
}
else
{
llSetStatus(STATUS_PHYSICS, FALSE);
if(llGetPermissions())
{
llReleaseControls();
llStopAnimation("sit");
}
}
}
}
run_time_permissions(integer perm)
{
if (perm)
{
llStartAnimation("sit");
llTakeControls(CONTROL_FWD | CONTROL_BACK | CONTROL_RIGHT | CONTROL_LEFT | CONTROL_ROT_RIGHT | CONTROL_ROT_LEFT | CONTROL_UP, TRUE, FALSE);
}
}
control(key id, integer level, integer edge)
{
vector angular_motor;
if(level & CONTROL_FWD)
{
llSetVehicleVectorParam(VEHICLE_LINEAR_MOTOR_DIRECTION, <25.0,0.0,0.0>);
}
if(level & CONTROL_BACK)
{
llSetVehicleVectorParam(VEHICLE_LINEAR_MOTOR_DIRECTION, <-15.0,0.0,0.0>);
}
if(level & (CONTROL_RIGHT|CONTROL_ROT_RIGHT))
{
angular_motor.z = -PI * 0.5;
}
if(level & (CONTROL_LEFT|CONTROL_ROT_LEFT))
{
angular_motor.z = PI * 0.5;
}
llSetVehicleVectorParam(VEHICLE_ANGULAR_MOTOR_DIRECTION, angular_motor);
}
}
DimplesApplePie Spicy
Maestro Linden I will need to provide my script in world, because I would to keep my work secret, so I will send it in world today thanks.