Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

Camera questions

in Codea Craft Posts: 1,089

In the Learn Craft example, Cameras tab, the code refers tocamera.eulerAngles, camera.position and camera.forward. It looks as if maybe camera.forward is a unit? vector in the direction the camera faces, but the manipulation of position eludes me. None of those values seem to be documented.

I'll try setting up some parameters and fiddle, but advice and pointers to info would be helpful, as would documentation of more of the hidden stuff in there.

Relatedly, I see to an entity's "transform". What might that be, pray tell?



  • Posts: 1,089

    Ah. eulerAngles and position are properties from entity. The way the code works is tricky to think about and pinned to the specifics of the geometry. If one positioned the camera at camera.forward, it would be one meter over center in whatever direction it is facing. Negating that and multiplying by 5 places the camera 5 meters off geometry center such that it's directly facing the center. Cute.

Sign In or Register to comment.