Jump to navigation Jump to search
- Set object's up vector. Direction of the object remain unchanged. Default object's vectorUp is [0,0,1].
- Math - Vectors
- object setVectorUp vectorUp
- object: Object
- vectorUp: Array format Vector (normalised)
- Return Value:
- Example 1:
- Turn object upside down:
_obj setVectorUp [0,0,-1];
- Example 2:
- Align object with the terrain underneath:
- See also:
- vectorDir vectorUp setVectorDir setVectorDirAndUp vectorDiff vectorAdd vectorMultiply vectorCrossProduct vectorDistance vectorMagnitudeSqr vectorDistanceSqr vectorCos vectorMagnitude vectorDotProduct vectorNormalized vectorFromTo
- Posted on Mar 03, 2009 - 21:07 (UTC)
setVectorUp can only influence an object's bank. It can not influence pitch. Example:
If the player is facing 90 degrees (east), then this will make him bank 90 degrees to his left.
- Posted on Mar 22, 2007 - 05:07 (UTC)
- An in-depth discussion on the concept of vectors is available here.
- Posted on Mar 16, 2008 - 09:49 (UTC)
- Command can be also used to rotate camera in all three axis (which also mean it is possible to set camera bank).
- Posted on Oct 03, 2013 - 09:04 (UTC)
It is possible to change both pitch and bank of an object (surfaceNormal application for instance). Assuming an ammo box in the following example is facing North (default direction is 0):
However the above will stop working as soon as you attach the box to something. The following trick however will work in this case: