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
Содержание DIRECTOR MX-USING DIRECTOR MX
Страница 1: ...Using Director MX Macromedia Director MX...
Страница 12: ...Contents 12...
Страница 156: ...Chapter 4 156...
Страница 202: ...Chapter 6 202...
Страница 244: ...Chapter 7 244...
Страница 292: ...Chapter 10 292...
Страница 330: ...Chapter 12 330...
Страница 356: ...Chapter 13 356...
Страница 372: ...Chapter 14 372...
Страница 442: ...Chapter 16 442...
Страница 472: ...Chapter 18 472...
Страница 520: ...Chapter 19 520...
Страница 536: ...Chapter 20 536...
Страница 562: ...Chapter 23 562...
Страница 566: ...Chapter 24 566...
Страница 602: ...Chapter 27 602...