I have a scene kit app I'm working on and at a certain point I move the camera under a list of objects and tilt it up to give a star wars type view of them. I then need to pull the objects up one at a time and face them at the camera. All of this is working however the last step is making them rotate so while facing the camera it looks like it's spinning on its y axis.

I'm setting my camera's eularAngle.x to 0.75. I then do the same to the object I'm bringing to the foreground so it faces the camera. I cannot for the life of me figure out the matrix math to make it spin correctly.

  • 1
    $\begingroup$ Could you add some clarification? Does "looks like it's spinning on its y axis" mean that it spins only during the process of rotating to face the camera, and is stationary thereafter? If the objects already end up facing the camera, could you explain how they currently move and what is unsatisfactory about it? $\endgroup$ – trichoplax Mar 25 '17 at 13:00
  • 1
    $\begingroup$ It would also help to see the code if you are able to post it. $\endgroup$ – trichoplax Mar 25 '17 at 13:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.