-
Notifications
You must be signed in to change notification settings - Fork 19
Closed
Description
2D tutorial Chapter 12: Collision Detection has the following bug:
// If the normal is anything but Vector2.Zero, this means the bat had
// moved outside the screen edge so we should reflect it about the
// normal.
if (normal != Vector2.Zero)
{
_batVelocity = Vector2.Reflect(_batVelocity, normal);
}
the normal here needs to be normalised because the bat can hit in the corner and results in a (1, 1) normal.
Metadata
Metadata
Assignees
Labels
No labels