cocos2dx--- Node 绕Y轴旋转

时间:2014-06-06 21:58:49   收藏:0   阅读:1731

step += 5;
float ra = (float) CC_DEGREES_TO_RADIANS(step);
float i = sinf(ra) * pNode->getCamera()->getZEye();
float j = cosf(ra) * pNode->getCamera()->getZEye();

pNode->getCamera()->setEyeXYZ(i, 0, j);

cocos2dx--- Node 绕Y轴旋转,布布扣,bubuko.com

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!