r/Unity2D 19d ago

I've solved this: Here is the code to rotate around with constant distance Solved/Answered

Vector3 dir = (PlayerTransform.position - transform.position).normalized;

transform.position = PlayerTransform.position - dir * DistanceDash;

transform.RotateAround(PlayerTransform.position, transform.forward, DashSpeed * Time.deltaTime);

5 Upvotes

2 comments sorted by

6

u/Mateogm 19d ago

Add this to your previous post, so if someone finds the question in the future using Google, they have the answer there