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

timeout - Handshake_timeout on RabbitMQ using python and pika from remote vm -

gcc - MinGW's ld cannot perform PE operations on non PE output file -

c# - Search and Add Comment with OpenXML for Word -