# How do we get the direction we're facing in 3D view?

pegasusroe shared this question 4 years ago

as title.

1

help of corner comand

```Corner( <Graphics View>, <Number of Corner> )
Creates a point at the corner of Menu view graphics.svg Graphics View (1, 2) which is never visible in that view. Supported values of number n are 1, 2, 3, 4 and 5 as above.
Note: Corner( <Graphics View>, <Number of Corner> ) won't work inside other commands. Instead create eg C_1 = Corner(1, 1) and use that.
Note: use -1 for the Perspectives algebra 3Dgraphics.svg 3D Graphics View's corners (available values for Number: from 1 to 8); for n = 9 returns point (w, h, 0), where w and h are width and height of the Graphics View in pixels; for n = 10 returns point (w, h, 0), where w and h are width and height of the main window in pixels; for n = 11 returns view direction  (for parallel projections) or eye position (for e.g. perspective projection).```

1

the values returned by Corner(11, n) seem useless in 3D view, any thoughts?

1

useless for.........what?

see the example attached

Files: foro.ggb
1

other useless divertimento

move the 3d screen

Files: foro.ggb
1

Amazing, but where's the code?

Thanks.

1

1

I think you can not get the ViewDirection in a simple way like yu can set the direction with this command.

You need to read mathmagics copy from the handbook completely

`  Note: use -1 for the Perspectives algebra 3Dgraphics.svg 3D Graphics View's corners (available values for Number: from 1 to 8); for n = 9 returns point (w, h, 0), where w and h are width and height of the Graphics View in pixels; for n = 10 returns point (w, h, 0), where w and h are width and height of the main window in pixels; for n = 11 returns view direction  (for parallel projections) or eye position (for e.g. perspective projection).`