Howdy, Stranger!

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

Camera Rigs: an alternate approach to Craft cameras and viewers

edited November 2021 in Codea Craft Posts: 1,817

Maybe it just doesn’t fit my brain holes somehow, but the “viewers” system for Craft cameras has always confounded me.

What I want is a single object that is (or acts like) a camera, entity, and viewer all at once, and that’s what I’ve tried to make here.

You first make a camera/viewer/entity thing by calling makeCameraViewerEntityThing(scene), and then you apply a “rig” function to it.

This project makes rig functions out of the two viewers in the builtin Cameras project, so there’s a first-person-view rig and a orbit-view rig.

One advantage you can see from this project is that it’s really easy to change rigs on the fly.



  • Posts: 1,817


    • Better commented to explain what’s going on
    • New icon, so it doesn’t look exactly like the “Cameras” project
  • Posts: 2,724
    @UberGoober - thanks for this, fits with my understanding better. I started playing with your other code but found most of it a little daunting. Will try to integrate into some of my projects.
    Thanks again
  • Posts: 1,817

    Updated to put almost all custom properties and functions inside an entity.rig table.

Sign In or Register to comment.