void Update() { GizmosDrawer.Instance.Clear(); DrawClock(trajectory.origin, trajectory.rotationOrigin, trajectory.rotationTarget); if (Input.GetKeyDown(KeyCode.Q)) { pathPosition = 0; StartMove(); } if (Input.GetKeyDown(KeyCode.W)) { MoveToMiddleTarget(); } if (Input.GetKeyDown(KeyCode.E)) { movement.FullRotation(3f, targets[pathPosition].position); } if (Input.GetKeyDown(KeyCode.R)) { trajectory = new Trajectory(transform.position, targets[pathPosition].position, weirdTarget.position, settings.radius); movement.SetTrajectory(trajectory); } }
public void RotateAroundPoint(float time) { movement.FullRotation(time, (path.CurrentPoint == null) ? Destination.Position : path.CurrentPoint.Position); }