<p>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.</p>

<p>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.</p>

CC BY-SA 3.0
2017-03-25T13:00:24.043Z
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?
trichoplax is on Codidact now
CC BY-SA 3.0
2017-03-25T13:08:23.527Z
It would also help to see the code if you are able to post it.
trichoplax is on Codidact now
<3d><transformations><matrix>
Tilting a 3d object to face a camera and have it look like it's spinning on the y axis
Dave.B
# Tilting a 3d object to face a camera and have it look like it's spinning on the y axis

(Asked by: username_0 on 2017-03-24)

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.

**Tags:** 3d, transformations, matrix

> **Comments:**
> **username_1**: 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?  
> **username_1**: It would also help to see the code if you are able to post it.  

---

## 0 answers

