-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Scripts with collision are treated the following way:
- Scripts register for collision by changing the SceneObjectPart AggregateScriptEvents flag, setting the desired collision
- DSG forwards update to other interested actors
- Physics receives update and tracks that part's collision.
- When collision happens at Physics, a message is sent informing of the ocurred collision (repeatedly, if using collision, instead of collision_start and collision_end)
- Script engine receives collision message, executes script.
System behaves erratically when overloaded. If the desired behavior of the collision is to kill the object, the physics actor continues to move the object until the script engine finally receives the collision and processes the llDie. During this period of time, that could possible last minutes, the object will move, possibly crossing quarks, being changed, updated, deleted, etc.
In a worst case, a race condition scenario could happen where the actor that requested the collision passes the object ahead and then receives the collision, whereas the actor that received the object received the collision and then got the object. In such case, the collision is missed by both actors and the script will not execute the collision section.