You declare it like this:

`let matrix = matrix_identity_float4x4`

matrix_identity_float4x4 is a constant, a starting point that you can augment. Make a new project in xcode with the AR template and use SpriteKit — you can see how they use it in Scene.swift.

Why do I pass degrees to translateMatrixFromHorizon — think of pointing your finger out in front of you with your arm straight out. This is 0 degrees. If you point up towards the sky, that’s 90 degrees. If you point down towards the ground that’s -90 degrees. Hope that helps.

Written by

Dreamer and schemer, designer turned developer. Lover of music and fine ales.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store