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

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -