a quick thing here, enums for CollisionGroups and CollisionMasks
Code: Select all
//These are the collision groups
enum XCollisionGroups
{
GHOSTS = 64, //They just have no collision at all
WALLS = 128, // BSP walls
ACTORS = 256, // Actors ( rigid bodies )
PLAYERS = btBroadphaseProxy::CharacterFilter
};
//These are the masks for collision detection
enum XCollidesWith
{
EVERYTHING = XCollisionGroups::ACTORS | XCollisionGroups::WALLS | XCollisionGroups::PLAYERS,
NOTHING = 0
};
i create my rigidbody as per below:
Code: Select all
Game->Physics()->getDynamic()->addCollisionObject(newActor.m_ghostObject,X::XCollisionGroups::ACTORS,X::XCollidesWith::EVERYTHING);
Code: Select all
p_Body->setCollisionFlags(X::XCollidesWith::NOTHING);
The thing i want to achieve is to 'switch' from a 'colliding' MASK to not colliding at all, but it seems like setCollisionFlags doesn't really react..
What exactly setCollisionFlags do? Does it change the group or mask ?
Can i ask you to help me out with this please?