Code: Select all
enum collisiontypes {
COL_NOTHING = 0, //<Collide with nothing
COL_WORLD = BIT(1), //<Collide with world
COL_PLAYER = BIT(2), //<Collide with player
COL_PLAYER_PROJECTILE = BIT(3), //<Collide with player projectile
COL_PHYS_OBJ = BIT(4), //<Collides with objects
COL_PICKUP_RAYTEST = BIT(5) //<For the raytest to pick up items
};Code: Select all
playerCollidesWith = COL_WORLD | COL_PHYS_OBJ;
worldCollidesWith = COL_PLAYER | COL_PHYS_OBJ | COL_PLAYER_PROJECTILE;
playerProjectileCollidesWith = COL_WORLD | COL_PHYS_OBJ | COL_PLAYER_PROJECTILE;
physObjCollidesWith = COL_WORLD | COL_PHYS_OBJ | COL_PLAYER | COL_PLAYER_PROJECTILE | COL_PICKUP_RAYTEST;
pickupRaytestCollidesWith = COL_PHYS_OBJ;