User Guide

Chapter 19502
Collision modifier commands
Use this command to work with the collision modifier:
Collision modifier events
These events are generated when collisions occur:
Animation modifiers
Once you’ve created animations in your modeling software, you apply animation modifiers to
models to play them back in Director.
Director supports both model keyframe and character bone animations, and modifiers are
available to enable both. Keyframe animations modify a models
transform properties over time.
Bones animations modify the model’s geometry over time. Creating bones animation in a 3D
modeling application can be complex, but it results in more natural-looking movements.
whichModel.collision.
resolve
Get and set TRUE (1) or FALSE (0) value indicating
whether collisions are automatically resolved.
If the value is
TRUE (1) and if the other
model has the
collision modifier applied
and has
enabled set to TRUE (1), the
models will be moved back to the position of
their original contact.
TRUE (1)
whichModel.collision.
immovable
Get and set TRUE (1) or FALSE (0) value indicating
whether the model can be moved. If a model
cannot be moved, the 3D Xtra can save time
by not checking it for collisions with other
models that also have their
immovable
property set to
TRUE.
FALSE (0)
Command Description Returns
whichModel
.collision.
setCollisionCallback
(
#handlerName, scriptObjectName)
If collision.enabled is set to TRUE
(1)
, this command registers the Lingo script
instance to receive an event when a collision
occurs. If
collision.enabled is set to
FALSE (0), no event occurs. What happens
when a collision occurs depends on the value
assigned to the
resolve property. You can
override this value by using the
collisionData.resolveA() or
collisionData.resolveB()
commands.
The
collisionData object will be the
second argument passed to
#handlerName
in the specified script object
scriptObjectName.
Nothing
Event Name Description
#collideAny The first event called when any collision occurs.
#collideWith The event called whenever a collision with a specified model occurs. It is implicitly
registered for when
setCollisionCallback() is called.
Property Access Description Default