如何使节点始终朝向它所面对的方向?
float tilt = _motionManager.accelerometerData.acceleration.x;
[_player runAction:[SCNAction rotateByX:0 y:-tilt * 0.03 z:0 duration:_dt]];
//Make SCNAction to moveBy X and Z in the direction _player is facing.有没有办法找出在_player面向的方向上1分之遥的SCNVector3是什么?
发布于 2015-05-13 02:18:20
才能得到玩家面前的位置。
SCNVector3 pos = [_scene.rootNode convertPosition:SCNVector3Make(0, 0, -1) fromNode:_player];https://stackoverflow.com/questions/30198476
复制相似问题