Chapter 19
502
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 model’s
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
Summary of Contents for DIRECTOR MX-USING DIRECTOR MX
Page 1: ...Using Director MX Macromedia Director MX...
Page 12: ...Contents 12...
Page 156: ...Chapter 4 156...
Page 202: ...Chapter 6 202...
Page 244: ...Chapter 7 244...
Page 292: ...Chapter 10 292...
Page 330: ...Chapter 12 330...
Page 356: ...Chapter 13 356...
Page 372: ...Chapter 14 372...
Page 442: ...Chapter 16 442...
Page 472: ...Chapter 18 472...
Page 520: ...Chapter 19 520...
Page 536: ...Chapter 20 536...
Page 562: ...Chapter 23 562...
Page 566: ...Chapter 24 566...
Page 602: ...Chapter 27 602...