Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.
Posted 06 October 2008 - 04:17 AM
Posted 06 October 2008 - 04:50 AM
Posted 06 October 2008 - 06:44 AM
Posted 06 October 2008 - 06:52 AM
Posted 06 October 2008 - 09:20 AM
Quote:
Original post by MikeTacular
A normal is a vector that is perpendicular to another vector or surface. A normalized vector is a vector with length 1. The terms are a little confusing, but they are very different. Most normal vectors are normalized, just because it makes calculations easier.
This Wolfram article helps explain reflection vectors. This Wolfram article explains normal vectors. This Wikipedia page explains a normal vector (a.k.a. surface normal) in relatively clear English terms.
Basically if you have a vector v, which represents the object's velocity, and a normalized normal vector n, which is perpendicular to the surface with which the object collides, then the new velocity v' is given by the equation:
v' = 2 * (v . n) * n - v;
Where '*' is the scalar multiplication operator, '.' is the dot product of two vectors, and '-' is the subtraction operator for two vectors. v is reflected off of the surface, and gives a reflection vector v' which is used as the new velocity of the object.
Posted 06 October 2008 - 10:22 AM
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.
GameDev.net™, the GameDev.net logo, and GDNet™ are trademarks of GameDev.net, LLC.