Advertisement
LeeMace

Orbit Around Object

Apr 19th, 2024
466
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.18 KB | Gaming | 0 0
  1.  [SerializeField] private GameObject target;
  2.  
  3.  public int speed = 10;
  4.  
  5.  void Update() {
  6.      transform.RotateAround(target.transform.position, Vector3.up, speed * Time.deltaTime);
  7.  }
Tags: Orbit
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement