Up vector???????????
Is the up vector always {0, 1, 0}, pointing in the positive Y axis? Thanks a bunch for any clarification!
Quote:Original post by geekalertMore context would be helpful, but the short answer is that the 'up vector' is whatever you want it to be. Most commonly though it is the positive Y or Z axis.
Is the up vector always {0, 1, 0}, pointing in the positive Y axis? Thanks a bunch for any clarification!
No.
The up vector is the cross-product of the forward and strafe vectors of an object. If you imagine an airplane banking in a turn, it's up vector is pointing from the center of the plane towards the roof. Similarly if you want to roll your camera, the up vector will change
-me
The up vector is the cross-product of the forward and strafe vectors of an object. If you imagine an airplane banking in a turn, it's up vector is pointing from the center of the plane towards the roof. Similarly if you want to roll your camera, the up vector will change
-me
Quote:Original post by Palidine
The up vector is the cross-product of the forward and strafe vectors of an object. If you imagine an airplane banking in a turn, it's up vector is pointing from the center of the plane towards the roof. Similarly if you want to roll your camera, the up vector will change
But then again, many apps define a global "up" as (0,1,0) that is used to find the local coordinate system.
The procedure is (from memory):
direction of movement x global up = right
right x direction of movement = local up
Quote:Original post by Palidine
No.
The up vector is the cross-product of the forward and strafe vectors of an object. If you imagine an airplane banking in a turn, it's up vector is pointing from the center of the plane towards the roof. Similarly if you want to roll your camera, the up vector will change
-me
That's the LOCAL up vector that changes as an object changes. The WORLD up vector will generally stay the same. It varies by engine, but is usually Z or Y, the sign also varies by engine.
Quote:Original post by jykJust to clarify, my answer was in reference to the 'global' up vector for the simulation.
More context would be helpful, but the short answer is that the 'up vector' is whatever you want it to be. Most commonly though it is the positive Y or Z axis.
Thanks for all your advice! The context is OpenAL, so I suppose the up vector doesn't really matter (I believe sounds should sound the same, rotated or not). But just in case I will add the crossproduct code to my game engine - foresight is better than hindsight!
Quote:Original post by geekalert
The context is OpenAL, so I suppose the up vector doesn't really matter (I believe sounds should sound the same, rotated or not). But just in case I will add the crossproduct code to my game engine - foresight is better than hindsight!
The "up" vector is whatever direction is "up" in your world. In some games, the Y axis is up. In some games, the Z axis is up. There are even some games where the -Z axis is up. Some games (such as space simulations) might not have an up direction.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement