![]() See MySCNView.swift in the repo for a demo.īy overriding the camera controller's rotate function, I can see that it is called with deltas. It ignores any other event types, like magnification, scrollwheel, which work in e.g. It works when I begin/update/end interactions from mouse down events. When interactions update and end call the corresponding functions on the camera controller mouseDown), call beginInteraction(_ location: CGPoint, withViewport viewport: CGSize) We now want the new camera controller to drive the scene. Set its pointofView to my scene's pointOfView (or its parent node I guess) ![]() I do that because I animate the camera, and applying both translation and rotation to the camera node doesn't create the animation I want. The reason I want to subclass it is that my camera is on a rig where I apply rotation to the rig and translation to the camera. I want to use SceneKit's camera controller to drive my scene's camera. ![]() TLDR I'm able to create my own subclassed camera controller, but it only works for rotation, not translation.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |