Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0008011opensim[REGION] Physics Enginespublic2016-08-26 17:592017-08-14 22:14
ReporterKayaker Magic 
Assigned ToRobert Adams 
PrioritynormalSeveritymajorReproducibilityalways
StatusassignedResolutionopen 
PlatformOSgridOSOpenSim 0.9OS Version0.9 Dev OSgrid
Product Version 
Target VersionFixed in Version 
Summary0008011: BulletSim fails to send land_collision messages on some terrain
DescriptionSometimes a falling physical object lands on the ground, stops there but fails to send land_collision_start messages to the script. It apparently does detect the collision, because the object stops and does not fall through the ground. But it never sends any land collision events to the script. I've had cannonballs land on the ground, fail to explode then skitter around on the ground like a drop of water on a hot frying pan until finally getting a land_collision_start a minute later.

This is a rare event that I think only happens on ground with a particular slope. So to reproduce the problem, I wrote a script that rezzes bullets over a random area. Set this experiment up over rough terrain and eventually bullets will land in places where they get stuck. I also think I see bullets bouncing, as if they bounce off some spots in the land without sending land_collision_start messages.

Steps To ReproduceTo reproduce this problem: put the bullet script in a 0.1x0.1x0.1 sphere. Mark it PHYSICAL but not TEMPORARY this time, you want them to hang around once they get stuck. Take the bullet prim into inventory. Put it inside another prim along with the frying pan script below. Move the frying pan script above an area with rough slope. Try areas that drop off rapidly, they often get stuck as the slope increases.
Additional Information//bullet script
//put this in a prim, mark the prim as PHYSICAL
//put the resulting prim in the inventory of a prim with the the frying pan script below
default
{
    collision_start(integer num)
    {
        llOwnerSay("start hit="+llDetectedName(0));
        llDie();
    }
    land_collision_start(vector pos)
    {
        llOwnerSay("land pos="+(string)pos);
        llDie();
    }


//frying pan
//rezzes objects over a random area to catch the ones that fail to detect land collisions
//put a bullet object in the prim with this script
//move it over an area that has rough terrain
default
{
    state_entry()
    {
        llSetTimerEvent(0.5);
    }
    timer()
    {
        vector del=<llFrand(1.0)+1.0,0,0>*llEuler2Rot(<0,0,llFrand(TWO_PI)>);
        llRezObject(llGetInventoryName(INVENTORY_OBJECT,0), //first object in inventory
                    llGetPos()+<0,0,-.19>+del, //randomly nearby
                    ZERO_VECTOR,ZERO_ROTATION,0); //standing still
    }
}
TagsNo tags attached.
Git Revision or version number
Run Mode Grid (1 Region per Sim)
Physics EngineBulletSim
EnvironmentMono / Linux64
Mono Version3.0
ViewerFireStorm
Attached Files

- Relationships

-  Notes
(0032251)
Robert Adams (administrator)
2017-08-14 22:14

This problem seems to be caused by terrain height calculation being different for the simulator vs the physics engine. That is, the simulator thinks the object is below the terrain so it moves it up but the physics engine never sees the object hit the terrain so no collision.

This problem happens on steep/rough terrain and especially with small objects.

I've added code to the BulletSim2017 source branch which has made the problem much better but not completely fixed. This branch will probably be merged into master soon.

- Issue History
Date Modified Username Field Change
2016-08-26 17:59 Kayaker Magic New Issue
2016-09-27 11:40 Robert Adams Assigned To => Robert Adams
2016-09-27 11:40 Robert Adams Status new => assigned
2017-08-14 22:14 Robert Adams Note Added: 0032251


Copyright © 2000 - 2012 MantisBT Group
Powered by Mantis Bugtracker