User Guide
Lingo Dictionary 141
collision (modifier)
Syntax
member(whichCastmember).model(whichModel).\
collision.collisionModifierProperty
Description
3D modifier; manages the detection and resolution of collisions. Adding the collision modifier
to a model by using the addModifier command allows access to the following collision
modifier properties:
enabled (collision) indicates whether collisions with the model are detected.
resolve indicates whether collisions with the model are resolved.
immovable indicates whether a model can be moved from frame to frame.
mode (collision) indicates the geometry used for collision detection.
Note: For more detailed information about these properties, see the individual property entries.
The collision modifier generates the following events. For more information about using collision
events, see the
registerForEvent() entry.
A
#collideAny event is generated when a collision occurs between models to which the
collision modifier has been attached.
A
#collideWith event is generated when a collision occurs with a specific model to which the
collision modifier has been attached.
The
collisionData object is sent as an argument with the #collideAny and #collideWith
events. See the collisionData entry for details of its properties.
See also
addModifier, removeModifier, modifiers
collisionData
Syntax
on myHandlerName me, collisionData
Description
3D data object; sent as an argument with the #collideWith and #collideAny events to the
handler specified in the
registerForEvent, registerScript, and setCollisionCallback
commands. The
collisionData object has these properties:
modelA is one of the models involved in the collision.
modelB is the other model involved in the collision.
pointOfContact is the world position of the collision.
collisionNormal is the direction of the collision.