I'm using SceneKit
to use a 3d car to use in google map just like Uber.
I managed to use it and rotate it but the camera is on top and I would like to rotate it once the location manager heading changes to see the edges of the car.
I tried changing the Euler angles but that didn't work well. I tried using the default camera but I didn't find how to place it on top or on left or on right ... I can only change it from the .scn file only but not in Code.
Fyi - you have allowsCameraControl = true, probably don't want that.
This is pretty quick way to get you started.
Set a constraint on your camera so that it always looks at your car, then you can adjust the cameraEye using simple vectors. You can do some math on the cars heading and place the cameraEye wherever you want it in relation to the direction it's moving (back, side, etc.), but the car will always be the focal point.
Something like this code with cameraFocus being your car:
Make sure you've added your camera objects: