在我的项目中,我必须旋转一个 OBJ 文件。我有恒定的支点。我得到了水平旋转。现在我必须垂直旋转我的 OBJ 文件。我得出结论,必须改变角度本身。给出在那个恒定的枢轴点垂直旋转的想法。
我的轴心点是 teapotNode_.rotationAxis = CC3VectorMake(0.1, 1, 0.3);
-(void)rightButtonPressed {
float angle;
teapotNode_.rotationAxis = CC3VectorMake(0.1, 1, 0.3);
angle +=2.0;
director_.running = YES;//Redirector object
if (director_.frameInterval == 2)
{
director_.running = NO;
}
}
-(void)leftButtonPressed {
float angle;
teapotNode_.rotationAxis = CC3VectorMake(0.1, 1, 0.3);
angle -=2.0;
director_.running = YES;//Redirector object
if (director_.frameInterval == 2)
{
director_.running = NO;
}
}
-(void)topButtonPressed {
float angle;
teapotNode_.rotationAxis = CC3VectorMake(0.1, 0, 0); ***//changed the Pivot point.***
angle +=2.0; **//how to calculate the Top Down angle.**
director_.running = YES;//Redirector object
if (director_.frameInterval == 2)
{
director_.running = NO;
}
}