<blockquote>
  <p>What if the camera rotate around its gaze direction? The v rotates while the t stays the same.</p>
</blockquote>

<p>The camera's orientation is defined by two directions: <strong>g</strong> and <strong>t</strong>. If the camera "rotates around its gaze direction", <strong>g</strong> will not be changing; that is what it means to "rotate around its gaze direction". If <strong>g</strong> isn't changing, and the camera's orientation is defined by two directions, then you can only get a different orientation if <strong>t</strong> is changing.</p>

<p>Therefore, your second statement is a contradiction of the first. Changing <strong>t</strong> is <em>precisely how</em> you cause the camera to "rotate around its gaze direction".</p>

<p>To put it a different way, there are changes to <strong>t</strong> which will <em>not</em> affect the values of <strong>u</strong>, <strong>v</strong>, or <strong>w</strong>. However, none of those changes will cause the camera to "rotate around its gaze direction".</p>

CC BY-SA 4.0
2018-10-05T03:06:42.790Z
I have seen many tutorials set t as Vector.up(0,1,0) in world space. So that only means the camera is put straight. The Vector.up(0,1,0) can't set up a camera with rotation around gaze direction. Have I understood your idea properly?
AlexWei
CC BY-SA 4.0
2018-10-05T03:08:36.497Z
"If g isn't changing, and the camera's orientation is defined by two directions, then you can only get a different orientation if t is changing."  So if I want to set up a camera with rotation around gaze direction, the t should be set other than Vector.up(0,1,0)?
AlexWei
CC BY-SA 4.0
2018-10-05T02:58:54.803Z
2018-10-05T02:58:54.803Z
Nicol Bolas
<p>Assume eye position e, gaze direction g, view-up vector t, right-handed base. As the graphs shows:
<a href="https://i.sstatic.net/G3CWy.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/G3CWy.png" alt="enter image description here"></a>
<a href="https://i.sstatic.net/fDzVi.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/fDzVi.png" alt="enter image description here"></a>  </p>

<p><span class="math-container">$w=-\frac{g}{||g||}$</span><br>
<span class="math-container">$u=\frac{t\times w}{||t\times w||}$</span><br>
<span class="math-container">$v=w\times u$</span></p>

<p>I am really confused about the 2nd equation <span class="math-container">$u=\frac{t\times w}{||t\times w||}$</span>.<br>
What if the camera rotate around its gaze direction? The v rotates while the t stays the same.<br>
Then the vector t will not in the plane that w and v lies in which means the second equation is wrong.</p>

<p>I know I have something misunderstood.<br>
Could someone please give me some clues?  </p>

CC BY-SA 4.0
2018-10-05T02:01:55.243Z
@NicolBolas Sorry. I have made a mistake. I have edited my question. "Then the vector t will not in the plane that w and u" should be "Then the vector t will not in the plane that w and v"
AlexWei
CC BY-SA 4.0
2018-10-05T02:04:53.723Z
It isn't *supposed* to be in that plane. W is the direction of the view. V is supposed to be to the right of the view. If T is up, you can't have the right of the view in the same plane as up.
Nicol Bolas
CC BY-SA 4.0
2018-10-05T02:16:51.480Z
@NicolBolas I have added two pictures. The v here is top of the view.
AlexWei
<camera>
Understanding of Camera Up Vector
AlexWei
# Understanding of Camera Up Vector

(Asked by: username_0 on 2018-10-04)

Assume eye position e, gaze direction g, view-up vector t, right-handed base. As the graphs shows:
[![enter image description here](https://i.sstatic.net/G3CWy.png)](https://i.sstatic.net/G3CWy.png)
[![enter image description here](https://i.sstatic.net/fDzVi.png)](https://i.sstatic.net/fDzVi.png)

$w=-\frac{g}{||g||}$  
$u=\frac{t\times w}{||t\times w||}$  
$v=w\times u$

I am really confused about the 2nd equation $u=\frac{t\times w}{||t\times w||}$.  
What if the camera rotate around its gaze direction? The v rotates while the t stays the same.  
Then the vector t will not in the plane that w and v lies in which means the second equation is wrong.

I know I have something misunderstood.  
Could someone please give me some clues?

**Tags:** camera

> **Comments:**
> **username_0**: @username_1 Sorry. I have made a mistake. I have edited my question. "Then the vector t will not in the plane that w and u" should be "Then the vector t will not in the plane that w and v"  
> **username_1**: It isn't *supposed* to be in that plane. W is the direction of the view. V is supposed to be to the right of the view. If T is up, you can't have the right of the view in the same plane as up.  
> **username_0**: @username_1 I have added two pictures. The v here is top of the view.  

---

## 1 answers

### Answer by username_1 on 2018-10-05. Score: 1 | Accepted answer

> What if the camera rotate around its gaze direction? The v rotates while the t stays the same.

The camera's orientation is defined by two directions: **g** and **t**. If the camera "rotates around its gaze direction", **g** will not be changing; that is what it means to "rotate around its gaze direction". If **g** isn't changing, and the camera's orientation is defined by two directions, then you can only get a different orientation if **t** is changing.

Therefore, your second statement is a contradiction of the first. Changing **t** is *precisely how* you cause the camera to "rotate around its gaze direction".

To put it a different way, there are changes to **t** which will *not* affect the values of **u**, **v**, or **w**. However, none of those changes will cause the camera to "rotate around its gaze direction".

> **Comments:**
> **username_0**: I have seen many tutorials set t as Vector.up(0,1,0) in world space. So that only means the camera is put straight. The Vector.up(0,1,0) can't set up a camera with rotation around gaze direction. Have I understood your idea properly?  
> **username_0**: "If g isn't changing, and the camera's orientation is defined by two directions, then you can only get a different orientation if t is changing."  So if I want to set up a camera with rotation around gaze direction, the t should be set other than Vector.up(0,1,0)?  

---

