Skip to content

Coordinates in yscene #1234

Answered by giacomonazzaro
M1ndHunteR asked this question in Q&A
May 25, 2021 · 1 comments · 2 replies
Discussion options

You must be logged in to vote

The "lookat" syntax for expressing frames in the json format matches the arguments of the function lookat_frame() in libs/yocto/yocto_math.h, with vector values unpacked.

Let's say you want to set a camera that, from point (1, 2, 3), looks at point (0, 0, 0), with up vector (0, 1, 0).
In the json format you will write:

...
"cameras": {
  "my_camera": {
    "lookat": [1,2,3,  0,0,0,  0,1,0],
    "lens": 0.1,
    "aperture": 0.0,
    "aspect": 2.4
  }
},
...

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@M1ndHunteR
Comment options

@xelatihy
Comment options

Answer selected by xelatihy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants