jhylands

spinning of spaceship

Jul 10th, 2013
199
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.   angOfRot+=0.01;
  2.                         for (i=0;i<6;i++){
  3.                     angle = i*pi/3;
  4.                    
  5.                     body.power[i].myMesh.position.set(-0.8+ship_radius*Math.cos(angle+angOfRot),1.6+ship_radius*Math.sin(angle+angOfRot),-19);
  6.                  
  7.                         }
  8.                       body.asteroid.myMesh.rotation.z = angOfRot
  9.                       myObject.rotation.x+=0.01;
  10.                       myObject.rotation.y+=0.01;
  11.                       myObject.rotation.z+=0.01;
Advertisement
Add Comment
Please, Sign In to add comment