ios - How to follow SCNNode with SCNCamera but don't rotate? -


im trying have camera point @ , follow ship, don't want rotate when ship rotates, how can achieve this?

code far:

let targetnode = scnlookatconstraint(target: ship) targetnode.gimballockenabled = true cameranode.constraints = [targetnode]  ship.addchildnode(cameranode)  //button click scnaction.rotatetox(0.0, y: 1.0, z: 0.0, duration: 0.5) 

( both camera , ship rotate, ship rotate. )

instead of making cameranode child of ship, should update position manually @ each frame based on ship's position.

i posted answer code sample right here.


Comments

Popular posts from this blog

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -

Kivy: Swiping (Carousel & ScreenManager) -