导航

cocos2dx--- Node 绕Y轴旋转

Posted on 2014-06-03 14:27  今非昔-毕  阅读(402)  评论(0)    收藏  举报

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);