Drag[en]gine Script Module DragonScript Script API  1.0
ColliderListener Interface Reference

Collider listener interface. More...

Inheritance diagram for ColliderListener:
SimpleElement TriggerArea CollectElementsListener DecalBuilder

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...
 

Detailed Description

Collider listener interface.

This is a native class.

Author
Roland Pl├╝ss
Version
1.0
Date
2015

Member Function Documentation

§ canHitCollider()

bool canHitCollider ( Collider  owner,
Collider  collider 
)

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.

Returns
true if a collision is possible or false otherwise.

Implemented in SimpleElement, DecalBuilder, TriggerArea, and CollectElementsListener.

§ colliderChanged()

void 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 SimpleElement, DecalBuilder, TriggerArea, and CollectElementsListener.

§ collisionResponse()

void collisionResponse ( Collider  owner,
CollisionInfo  info 
)

Calculate response for a collision.

If you set Collider.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 SimpleElement, DecalBuilder, TriggerArea, and CollectElementsListener.


The documentation for this interface was generated from the following file: