3
votes

I have an object that can rotate around a sphere. Basically I need to move object from initial position to new position (From V1 to V2) using RotateAround. V1 is initial position and V2 is position that can be anywhere around the sphere. I have value of both Vectors so I can calculate angle with Vector3.Angle() but I don't know how to calculate proper axis to use in RotateAround() method.

enter image description here

1
it's possible LookAt can help you - Fattie

1 Answers

0
votes

Just use Vector3.up or Transform.up as in example

EDIT:

I think I get it. Assuming that V1 and V2 have the same length: Just find new vector perpendicular to this vectors using Vector3.cross