Exemplo n.º 1
0
    public override CollisionInfo TestCollision(CollisionHull3D other)
    {
        switch (other.HullType)
        {
        case CollisionHull3D.CollisionType.Circle:
            return(CollisionHull3D.CircleVSOBB(other as CircleHull, this));

        case CollisionHull3D.CollisionType.AABB:
            return(CollisionHull3D.AABBVSOBB(other as AABBHull, this));

        case CollisionHull3D.CollisionType.OBB:
            return(CollisionHull3D.OBBVSOBB(this, other as OBBHull));

        default:
            break;
        }

        return(null);
    }