|Anonymous | Login | Signup for a new account||2017-12-12 17:45 PST|
|Main | My View | View Issues | Change Log | Roadmap | Summary | My Account|
|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0008010||opensim||[REGION] Physics Engines||public||2016-08-26 16:33||2017-08-14 18:55|
|Assigned To||Robert Adams|
|Platform||OSGrid||OS||OpenSim 0.9||OS Version||0.9.0.0 Dev OSgr|
|Target Version||Fixed in Version|
|Summary||0008010: BulletSim does not always call collision events on collisions|
|Description||In Mantis 8009 I reported that sometimes a small object passes through a larger one without generating collision events. Sometimes they do generate collision events. There is a third behavior that happens often: The bullet object bounces off the target object but does not generate any collision events in either object. Since it does bounce off, the collision is being detected, it is just not being reported to the scripts by calling the events.|
|Steps To Reproduce||To see this problem, put the target script below into a 4x0.5x4 meter box and name the box target. Put the bullet script into a 1x0.1x0.1 box. Mark the bullet physical and temporary and name it bullet. Put the bullet prim and the bullet script in a gun prim. Point the +x axis of the gun at the target and click it to fire. The distance and angle of the gun to target makes things fail at different rates. So move the gun around and try again until you see failures. With a 1 meter bullet you will see all three behavors: sometimes the bullet flies through with no collisions, sometimes it collides correctly, and sometimes it bounces off without generating any collisions (until it falls down to the ground and gets a land_collision_start).|
|Additional Information|| //target script|
//put this in any prim, it tells you when it gets collision events
llOwnerSay("collision start name="+llDetectedName(0));
llOwnerSay("collision end name="+llDetectedName(0));
//put this in a prim, mark the prim as PHYSICAL and TEMPORARY
//put the resulting prim in the inventory of a gun
//put this script and a bullet in in a small (less than 0.5m tall) object
//when you click it, it fires a bullet in the local +X direction, so turn to aim with the build tools
//Don't wear this object, think of it as a cannon
llSetText("touch to fire",<1,0,0>,1.0);
llRezObject(llGetInventoryName(INVENTORY_OBJECT,0), //rez the first object in inventory
|Tags||No tags attached.|
|Git Revision or version number|
|Run Mode||Grid (1 Region per Sim)|
|Environment||Mono / Linux64|
Robert Adams (administrator)
First of all, thanks for the wonderful reproduction setup -- this problem was easy to duplicate. That said, I don't have a fix yet.
The problem with passing through the target is that the bullets are small (0.1x0.1x0.1) which is below some the default collision thresholds set for BulletSim. Using a bigger bullet (like 0.5x0.5x0.5) stops the passing through. I'll have to play with parameter settings to see if there is a region setting that works for the smaller bullets.
The bouncing off with no collision problem is a head scratcher. I originally thought the problem was that the collision event was not getting passed to the script engine. Looking that the physics logs, though, confirms that the bullet is bouncing off the target but no collision even is being reported by the Bullet engine. Should not be possible.
I twiddled the single sided mesh option as well as other parameters to try and enable the collision reporting with no effect. Even more odd is that sometimes the bullet bounces off and sometimes the collision is correctly reported. Makes me think there is some edge case in collision manifold computation.
Anyway, I will continue looking into this bug but don't have a resolution yet.
Robert Adams (administrator)
I found that BulletSim was not checking for collisions on all the simulation substeps. I have an updated version of BulletSim on the 'BulletSim2017' branch in the source repository. I'm concerned about performance so I will be testing before merging it into master.
But that fix fixes this problem and a lot of tunneling (physical objects going through) problems.
|2016-08-26 16:33||Kayaker Magic||New Issue|
|2016-09-27 11:38||Robert Adams||Assigned To||=> Robert Adams|
|2016-09-27 11:38||Robert Adams||Status||new => assigned|
|2016-10-02 15:25||Robert Adams||Note Added: 0031174|
|2017-08-14 18:55||Robert Adams||Note Added: 0032250|
|Copyright © 2000 - 2012 MantisBT Group|