Attention |
Topic was automatically imported from the old Question2Answer platform. | |

Asked By |
fuck |

The online documentation of Vector3 says

Vector3 bounce (Vector3 n):

Returns the vector “bounced off” from a plane defined by the given normal.

Vector3 reflect ( Vector3 n ):

Returns this vector reflected from a plane defined by the given normal.

What is the difference between these two methods?

I’m guessing the difference is in the magnitude of the returned vectors. With `reflect()`

, it returns the mirror of the input vector, but the magnitude (i.e. the length) is the same. With the `bounce()`

function, it takes into account the momentum of the object, and so the returned vector has a smaller length.

Ertain | 2020-08-07 06:36