Method Reflect
Reflect(Vector2, Vector2)
Returns the reflection of a vector off a surface that has the specified normal.
Declaration
public static Vector2 Reflect(Vector2 vector, Vector2 normal)
Parameters
Type | Name | Description |
---|---|---|
Vector2 | vector | The source vector. |
Vector2 | normal | Normal of the surface. |
Returns
Type | Description |
---|---|
Vector2 | The reflected vector. |
Remarks
Reflect only gives the direction of a reflection off a surface, it does not determine whether the original vector was close enough to the surface to hit it.