How do I rotate the 1st object around a 2nd object based off of the mouse position relative to the Second object.
Hard to describe so please check out the picture.
So, I need to rotate the object (ORANGE) around a Ball (RED) dependent on the position of the Mouse (BLUE) in 3d space.
I was thinking the best way to do this would be to get a raycast from the mouse position to a plane. Then get a second raycast (GREEN) from the ball to the mouse position. And then position the Object (ORANGE) a certain distance down the raycast.
I guess, I’m wondering if this is the easiest way to do this or am I missing something even easier.
If this is the easiest then I’ll move forth and try to do this.
If you don’t understand what I’m talking about still, think MiniGolf. Any assistance in this matter is greatly appreciated. Thanks.