You are here: Lua Scripting Resources eGuide > Lua Scripting API Reference Guide > Physics Library > setCollisionType

19.5.11 setCollisionType

self = physics.Shape:setCollisionType(collisionType)

Parameter

Type

Description

self

in physics.Shape

The input Shape

collisionType

in number

Programmer-defined type of collision

self

out physics.Shape

The input Shape is returned as the output

Assigns a collision type (an integer value of your choosing) to the shape. It is used to determine which handler to call when a collision occurs. Returns self.

Introduced in platform.apiLevel = '2.0'