PlayerObjectCollision¶
Description¶
Checks for collision of an object with the player, using the hitbox values passed.
Parameters¶
CollisionType-
Type of collision with the object, can be
C_TOUCH,C_BOX,C_BOX2orC_PLATFORM. In Origins Plus,C_BOX3andC_ENEMYare available as well. Left/Top/Right/Bottom-
The values for the object's hitbox.
Return Value¶
- If there wasn't any collision,
CheckResultwill befalse. - Depending on the
CollisionTypeused: -
C_TOUCH/C_ENEMY:CheckResultwill returntruewith any type of collision
-
C_BOX/C_BOX2/C_BOX3:CheckResultwill return values1(Floor),2(LWall),3(RWall) or4(Roof) depending on the side of the object collided with.
-
C_PLATFORM:CheckResultwill only betrueif the top of the object was collided with.