- Home /
Question by
EBSpark · 3 days ago ·
c#rigidbody2drotate-around
How can I make a object/sprite rotate around another object/sprite using rigidbody
I am trying to get these orbs/sprites to rotate around another sprite using rigidbody 2d... unfortunately it keeps going crazy during the rotation so it isnt working properly. This is what I have.(ps the sprites that are rotating around the main one are childs of the main one/the parent) public class circleRotation : MonoBehaviour public GameObject rotationAroundObject; Public float speed; Private void Update() { GetComponent().transform.RotateAround(rotationAroundObject.transform.position, Vector3.forward, speed * 100 * Time.deltaTime); } }
Comment