getVelocityReflection method
Implementation
Vector2 getVelocityReflection(
PositionComponent other,
CollisionData data,
) {
if (_bodyType.isStatic) {
return velocity;
}
return data.normal * velocity.dot(data.normal);
}
Vector2 getVelocityReflection(
PositionComponent other,
CollisionData data,
) {
if (_bodyType.isStatic) {
return velocity;
}
return data.normal * velocity.dot(data.normal);
}