User Guide

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 isnt 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 players score could be increased. In that
same game, however, you might not want the projectile to bounce off the wall. In that case, youd
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)