Ensure Correct Computation of Vectors

(52 occurrences)

Context

Many games involve movements of objects. Vectors are fundamental in representing the aspects of objects such as position, direction, velocity, acceleration, momentum and so on.

Problem

Incorrect computation while updating the vectors associated with the objects can cause incorrect movements and produce unstable results.

Solution

This can be avoided by ensuring the use of correct formulas from mathematics and physics domain to update the vectors associated with the object.

Example

Consider the example from the post 143430 where the programmer wants to compute the relative quaternion rotation of an object. Use of incorrect formula produces unexpected results for some specific rotations. This can be overcome by using the correct vector update formula.

Occurrences

Questions
52 occurrences