Drag[en]gine Script Module DragonScript
1.21
|
Collider listener interface. More...
Public Member Functions | |
Notifications. | |
void | collisionResponse (Collider owner, CollisionInfo info) |
Calculate response for a collision. More... | |
bool | canHitCollider (Collider owner, Collider collider) |
Collider can collide with another collider. More... | |
void | colliderChanged (Collider owner) |
Collider properties have changed and attached resources have been updated. More... | |
Collider listener interface.
This is a native class.
Collider can collide with another collider.
This test is typically done early in collision testing. Make sure to return consistent results. If a collider A can hit a collider B if asked then collider B should return the same answer if asked. Also keep the returned result consistent during a frame update.
Implemented in Dragengine.Utils.CollectElementsListener, Dragengine.Utils.DecalBuilder, Dragengine.Scenery.ECBehaviorCollider.Instance, Dragengine.Scenery.ECBehaviorColliderAI.Instance, and Dragengine.Gui.MainMenus.Interactive.IMMInteract.
void Dragengine.Scenery.ColliderListener.colliderChanged | ( | Collider | owner | ) |
Collider properties have changed and attached resources have been updated.
This is usually called after the collision detection has finished and the collider has been moved. It is though possible for a physics module to call this multiple times during one frame update.
Implemented in Dragengine.Utils.CollectElementsListener, Dragengine.Utils.DecalBuilder, and Dragengine.Gui.MainMenus.Interactive.IMMInteract.
void Dragengine.Scenery.ColliderListener.collisionResponse | ( | Collider | owner, |
CollisionInfo | info | ||
) |
Calculate response for a collision.
If you set CollisionResponse.kinematic on a collider you have to update the info object with the response to the collision. In all other cases you still get the collision notification but you must not modify the collider. Doing so can result in strange problems.
Implemented in Dragengine.Utils.CollectElementsListener, Dragengine.Utils.DecalBuilder, Dragengine.Scenery.ECBehaviorCollider.Instance, and Dragengine.Gui.MainMenus.Interactive.IMMInteract.