Working with Models and Model Resources
501
Use these properties to work with the SDS modifier:
Collision modifier properties
The collision modifier allows a model to be notified of and respond to collisions. You can access a
model’s collision modifier properties using syntax such as
model.collision.
whichProperty
.
Detecting collisions and responding to collisions are separate tasks. If the
enabled
property is set
to
TRUE
, and a script has been registered to be notified of collisions using the
setCollisionCallback()
method, that Lingo script instance receives a callback. However, the
collision isn’t resolved unless the
resolve
property is also set to
TRUE
.
This separation is deliberate and valuable: it can be important for a collision to be registered. In a
game, for example, a projectile could strike a wall and the player’s score could be increased. In that
same game, however, you might not want the projectile to bounce off the wall. In that case, you’d
set the
enabled
property to
TRUE
and set the
resolve
property to
FALSE
.
Use these properties to work with the collision modifier:
Property
Access
Description
Default
whichModel
.sds.enable
d
Get and set
Enables/disables subdivision surfaces
modifier functionality.
TRUE (1)
whichModel
.sds.
subdivision
Get and set
The following are the possible values:
#uniform
: mesh is uniformly scaled up in
detail, with each face subdivided the same
number of times
#adaptive
: additional detail is added only
when there are major orientation changes and
only to those areas of the mesh that are
currently visible
#uniform
whichModel
.sds.depth
Get and set
Maximum recursion depth, with a range of 0 to
5, to which the subdivision surfaces modifier is
applied. At a value of
0
, no change occurs.
1
whichModel
.sds.tensio
n
Get and set
Percentage of matching between modified
and original surfaces.
65
whichModel
.sds.error
Get and set
Percentage of error tolerance. This property
applies only if sds.subdivision equals
#adaptive
.
0.0
Property
Access
Description
Default
whichModel
.collision.
enabled
Get and set
TRUE (1)
or
FALSE (0)
value indicating
whether collisions between this model and
other models will trigger a collision event.
TRUE (1)
Содержание 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...