Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0005964opensim[REGION] Script Functionspublic2012-04-15 21:022012-04-18 08:23
ReporterKayaker Magic 
Assigned To 
PrioritynormalSeverityminorReproducibilityalways
StatusnewResolutionopen 
PlatformGriddal 0.7.1 Dev Griddal/r10OSOS VersionGriddal 0.7.1
Product Versionmaster (dev code) 
Target VersionFixed in Version 
Summary0005964: llSetStatus(STATUS_PHYSICS,FALSE) fails on moving object
DescriptionWhen llSetStatus is used to turn physics off, it fails if the object is still moving under the influence of a llMoveToTarget call. Even if llStopMoveToTarget() is called first. It fails in a spectacular way with the object taking off at an ever accelerating velocity, off the edge of the SIM never to be seen again. If, however, you wait for the llMoveToTarget to finish, then the llSetStatus(STATUS_PHYSICS,FALSE) call works.

A workaround is to call llMoveToTarget(llGetPos(),0.05), then sleep for at least 0.05 seconds. This apparently aborts the previous move, then gives the new one time to finish. Then it is safe to call llSetStatus.
Steps To ReproduceTo reproduce:
    Create a prim, place it a meter or so above the ground, place the following scrip in it. Click on the prim and wait for the motion to stop before clicking again. Note the correct behavior. Starting with the green floating text, (Touch to make physical) click on the prim twice rapidly (less than 5 seconds apart). Observe that the prim takes off at high speed. If you are focused on it, you may be able to click it again to stop it. If you are successful, it returns to a position that indicates llGetPos is unaware of the runaway position of the prim.

Additional Information//physics on/off test
// demonstrates the problem with llSetStatus(STATUS_PHYSICS,FALSE)
// on a moving object.
vector move=<2,1,0>; //short move to show physics
default
{
    state_entry()
    {
        llSetStatus(STATUS_PHYSICS,FALSE); //make sure physics is off for starters
        llSetText("Touch to start",<0,1,0>,1.0);
    }
    touch_start(integer num)
    {
        if (llGetStatus(STATUS_PHYSICS)==FALSE)
        {
            llSetStatus(STATUS_PHYSICS,TRUE); //turn physics on
            llMoveToTarget(llGetPos()+move,5.0); //move to a new position over 5 seconds
            llSetText("Touch to make NON physical",<1,0,0>,1.0);
            move *= -1; //reverse direction for next time
        }
        else
        {
                    //WORKAROUND: un-comment the following two lines
// llMoveToTarget(llGetPos(),0.05); //stop in your tracks! Please!
// llSleep(.10); //Give it time to take effect

            llStopMoveToTarget(); //stop last move
            llSetStatus(STATUS_PHYSICS,FALSE); //turn physics off
            llSetText("Touch to make physical",<0,1,0>,1.0);
        }
    }
}
TagsNo tags attached.
Git Revision or version numberunknown
Run Mode Standalone (Multiple Regions)
Physics EngineODE
Script Engine
EnvironmentUnknown
Mono VersionNone
ViewerImprudence
Attached Files

- Relationships

-  Notes
(0021264)
Talun (manager)
2012-04-18 08:23
edited on: 2012-04-18 08:23

This appears to behave properly on a build of the leading edge running standalone (Imprudence say it is "OpenSim 0.7.4 Dev"). prim stops and reverses in good order, ODE on XP.


- Issue History
Date Modified Username Field Change
2012-04-15 21:02 Kayaker Magic New Issue
2012-04-18 08:23 Talun Note Added: 0021264
2012-04-18 08:23 Talun Note Edited: 0021264 View Revisions


Copyright © 2000 - 2012 MantisBT Group
Powered by Mantis Bugtracker