Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0007303opensim[REGION] Physics Enginespublic2014-08-17 09:132015-12-22 23:12
Reportermaurizio55 
Assigned ToRobert Adams 
PrioritynormalSeveritymajorReproducibilityrandom
StatusassignedResolutionopen 
PlatformOSOS Version
Product Versionmaster (dev code) 
Target VersionFixed in Version 
Summary0007303: llMoveToTarget not working properly with bulletsim
DescriptionllMoveToTarget has a strange behavior or has no effect when physic engine is bulletsim. With ODE no problems.
Steps To Reproducethis simple script (every time you click the object moves randomly in a radius of 10 meters) works ok in a newly created object (even though the movement is a bit scatterd and not as smooth as with ODE)

But, if I drag from inventory an object previously scripted, the object tends to fly to the previous position and any call to llMoveToTarget is totally ignored. It has to be something related to persisting properties on the object itself, but I have no idea of what to try. Anything else to try to reset persisting status, on top of llStopMoveToTarget() and non-physical functions like llKeyframedMotion([].[]) ?

With ODE everything works fine and the movements are much smoother.
Here is the script:

float traveltime = 4.0;
vector vCenter;
float maxdistance = 10.0;

default
{
    state_entry()
    {
        llSetStatus(STATUS_PHYSICS, FALSE);
        vCenter = llGetPos();
        llSetStatus(STATUS_PHYSICS, TRUE);
        llStopMoveToTarget();//to avoid possible previous persistent settings

        //random position in a 10*10 square centered on initial position
        vector destination = vCenter + <llFrand(maxdistance) - (maxdistance/2), llFrand(maxdistance)-(maxdistance/2),0.0>;
       llMoveToTarget( destination, traveltime );
    }

    touch_start(integer total_number)
    {
        llMoveToTarget( vCenter + <llFrand(maxdistance)-(maxdistance/2), llFrand(maxdistance)-(maxdistance/2),0.0>, traveltime );
    }
    
}
Additional InformationNote: the script is simplified. I did tests trying to call the function on on_rez() as well, and printing debug messages to be sure that the function was called, but with bulletsim llMoveToTarget in some conditions is not being called or has no effect.
TagsNo tags attached.
Git Revision or version number
Run Mode Standalone (Multiple Regions)
Physics EngineBulletSim
Script Engine
EnvironmentMono / Linux64
Mono Version2.10
Viewerfirestorm 64 and 32
Attached Files

- Relationships

-  Notes
(0029846)
maurizio55 (reporter)
2015-12-21 19:39

Found a workaround. (for bulletsim)

Once the object status has been changed to physical, just change the PRIM_PHYSICS_SHAPE_TYPE twice with 2 different values.
For some reason this will trigger the llMoveToTarget action.

        llSetLinkPrimitiveParamsFast(LINK_THIS,[PRIM_PHYSICS_SHAPE_TYPE, PRIM_PHYSICS_SHAPE_PRIM]);
        llSetLinkPrimitiveParamsFast(LINK_THIS,[PRIM_PHYSICS_SHAPE_TYPE, PRIM_PHYSICS_SHAPE_CONVEX]);

I think this can be considered a bug, probably easily fixable.
(0029850)
UbitUmarov (administrator)
2015-12-22 03:28

that can be very expensive in terms of cpu load, that should be avoid!!!
if physical the collisions volume also changes, possible creating wrong collisions
The rest of script used any vehicle code? llMoveToTarget will be unpredictable if so, both on bullet and ubOde (possible not work at all on ubOde)
(0029861)
maurizio55 (reporter)
2015-12-22 23:12

Yes, I filtered the collisions, so no collisions detected. I need to use physical objects to use doppler effects from moving audio sources. doppler works only on physical objects. With ODE no problems, but the movement is not smooth. Bulletsim behavior, when working, is more similar to Havok in SL.

- Issue History
Date Modified Username Field Change
2014-08-17 09:13 maurizio55 New Issue
2014-08-17 09:43 Robert Adams Assigned To => Robert Adams
2014-08-17 09:43 Robert Adams Status new => assigned
2015-12-21 19:39 maurizio55 Note Added: 0029846
2015-12-22 03:28 UbitUmarov Note Added: 0029850
2015-12-22 23:12 maurizio55 Note Added: 0029861


Copyright © 2000 - 2012 MantisBT Group
Powered by Mantis Bugtracker