Question by
coubaybear · Sep 28, 2016 at 03:29 AM ·
rotatearound
Who can help me with RotateAround,it's unbelievable!
float degree = 90;
public IEnumerator rotate(){
int frames = 9;
float degreesPerFrame = degrees / (float)frames;
for (int i=1; i<=frames; i++) {
this.transform.RotateAround( RollPoint, Axis, degreesPerFrame );
yield return new WaitForFixedUpdate();
}
}
All about that code is well to run, I had made the degree to 90,but the cube will rotate with 90.00001 degree or 89.000012 degree and the like。 who can help me?
Comment
Your answer
Follow this Question
Related Questions
Rotate GameObject with controller of HTC vive 0 Answers
Rotatearound and face the direction of movement 0 Answers
Clamp camera orbit rotation using RotateAround 2 Answers
Rotate an Object while moving forward using empty gameObject 0 Answers
Unwanted translation when rotating axisymettric object 0 Answers