raygame/Actor.cpp
//Checks the collision between 2 actors

Checks the collision between 2 actors
Checks the collision between 2 actors
bool Actor::checkCollision(Actor* other)
{
    float distance = (other->getWorldPosition() - getWorldPosition()).getMagnitude();
    return distance <= m_collisionRadius + other->m_collisionRadius;
}
bool Actor :: checkCollision ( Actor * other ) { float distance = ( other -> getWorldPosition ( ) - getWorldPosition ( ) ) . getMagnitude ( ) ; return distance <= m_collisionRadius + other -> m_collisionRadius ; }
Checks the collision between 2 actors
Checks the collision between 2 actors