Hi all!
If I understand correctly, then transform.rotatearound uses three variables. The first is a transform to orbit, the second is the direction of the rotation and the thid (which is what I wish to discuss) is the speed of the rotation calculated via degrees per second (or whatever timeframe you choose).
What I wish to ask is - Say that an object moves in a certain speed and is then oredered to orbit another object via the RotateAround command. How to I assign it a correct degrees per sec value that will maintain it’s current speed perfectly and (if needed) translate it back into speed should I wish it to lose its’ orbit?
I know it has something to do with the distance between them but my brain just can’t figure out the physics…
Lastly, and on a related note - the Direction. How do I make sure that, given the velocity vector of an object A and it’s relation in space to object B, said object A enters orbit in a direction that fits its’ inital velocity. I managed to figure out a very VERY rough system with many “if” clauses to figure out all possible cases for this but I was wondering if maybe there is a more elegant approach
much obliged!