- Home /
 
               Question by 
               TripodGRANNE · Feb 25, 2012 at 04:19 AM · 
                rotationvector3rotaterotatearound  
              
 
              Rotate One Object Around Another
Hello, this has been bothering me really bad for the past hour and i still cant figure it out. Im trying to get one Sphere to rotate around another Sphere. This is my code:
 using UnityEngine;
 using System.Collections;
 public class Shooting : MonoBehaviour {
 public Transform player;
 void Update () {
         transform.RotateAround (player.position, Vector3.up, 20 * Time.deltaTime);
     }
 }
Ive tried so many things to try to get this to work and there has been absolutely no progress, also to be quiet honest i usually dont have these kind of simple problems haha.
Thanks for the help
               Comment
              
 
               
              Answer by KrisCadle · Feb 25, 2012 at 05:41 AM
Maybe this will help http://unifycommunity.com/wiki/index.php?title=Simple_planetary_orbits
Your answer
 
 
              koobas.hobune.stream
koobas.hobune.stream 
                       
                
                       
			     
			 
                