Beispiel #1
0
bool CCollider::distCollision(CCollider & other, const double dt)
{
	// TODO: Make exceptions for oval

	// Temp dist collision (Only works with circles)
	float distSquared = (other.GetPosition() - m_position).LengthSquared();
	float thisRadius = m_diameter.x * 0.5f, oRadius = other.GetDiameter().x * 0.5f;

	if (((thisRadius * thisRadius) + (oRadius * oRadius)) < distSquared)
	{
		return true;
	}
	return false;
}