Esempio n. 1
0
// virtual
int16_t EntityMotionState::computeCollisionGroup() {
    switch (computeObjectMotionType()){
        case MOTION_TYPE_STATIC:
            return COLLISION_GROUP_STATIC;
        case MOTION_TYPE_KINEMATIC:
            return COLLISION_GROUP_KINEMATIC;
        default:
            break;
    }
    return COLLISION_GROUP_DEFAULT;
}
Esempio n. 2
0
// virtual
int16_t EntityMotionState::computeCollisionGroup() {
    if (!_entity) {
        return COLLISION_GROUP_STATIC;
    }
    if (_entity->getIgnoreForCollisions()) {
        return COLLISION_GROUP_COLLISIONLESS;
    }
    switch (computeObjectMotionType()){
        case MOTION_TYPE_STATIC:
            return COLLISION_GROUP_STATIC;
        case MOTION_TYPE_KINEMATIC:
            return COLLISION_GROUP_KINEMATIC;
        default:
            break;
    }
    return COLLISION_GROUP_DEFAULT;
}