I'm trying to get an object to orbit around a point at a fixed distance. I've tried some methods such as setting the position of the object to the normalized vector multiplied by how far away I want the object to be from the pivot, but the input vector is sometimes (0, 0), which when multiplied results in 0 causing the orbiting object to snap to the position of the pivot.
In object based scene hierarchies such as the Unity Game Engine, you are able to parent an object to another, and use that parent as a pivot point, causing the child to behave in exactly the way I want my orbiting object to behave.
Example of this behavior in Unity:
I don't need the rotation of the child to change as I already have that handled, I just need the position of the object to move based on the angle so it always maintains the same distance from the pivot. Is there a formula to calculate this position based on either an angle or a vector or any resources that I could use to learn more about how to achieve something like this?
All I need is to take input of an angle or vector and receive a position relative to the pivot location as output.
If anything needs clarification let me know. Thanks!
