What's New in Director 8.5 > Working with Models and Model Resources > Modifiers > Collision modifier properties |
![]() ![]() ![]() |
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 incremented. 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 |
---|---|---|---|
|
Get and set |
|
|
|
Get and set |
|
|
|
Get and set |
|
|
![]() ![]() ![]() |