This method can be used to set custom collision responses between different collision types.
Parameter | Description |
---|---|
type1 | one of the collision types in the collision |
type2 | the other collition type in the collision |
response | the collision response, can be COLLISIONRESPONSE_NONE, COLLISIONRESPONSE_COLLIDE, or COLLISIONRESPONSE_DETECT |
The collision types can be any integer value or predefined collision type:
The table below shows the default collision responses the engine defines for each new world:
Type 1 | Type 2 | Response |
---|---|---|
COLLISIONTYPE_PROP | COLLISIONTYPE_PROP | COLLISIONRESPONSE_COLLIDE |
COLLISIONTYPE_PROP | COLLISIONTYPE_SCENE | COLLISIONRESPONSE_COLLIDE |
COLLISIONTYPE_DEBRIS | COLLISIONTYPE_SCENE | COLLISIONRESPONSE_COLLIDE |
COLLISIONTYPE_DEBRIS | COLLISIONTYPE_PROP | COLLISIONRESPONSE_COLLIDE |
COLLISIONTYPE_SCENE | COLLISIONTYPE_PLAYER | COLLISIONRESPONSE_COLLIDE |
COLLISIONTYPE_PROP | COLLISIONTYPE_PLAYER | COLLISIONRESPONSE_COLLIDE |
COLLISIONTYPE_PLAYER | COLLISIONTYPE_PLAYER | COLLISIONRESPONSE_COLLIDE |
COLLISIONTYPE_SCENE | COLLISIONTYPE_PROJECTILE | COLLISIONRESPONSE_COLLIDE |
COLLISIONTYPE_PROP | COLLISIONTYPE_PROJECTILE | COLLISIONRESPONSE_COLLIDE |
COLLISIONTYPE_PLAYER | COLLISIONTYPE_TRIGGER | COLLISIONRESPONSE_DETECT |