Someone on here said use the transform.RotateAround() but that’s all the hints they gave to another user. Since I am new to scripting entirely I’m finding it difficult to put the pieces together on my own. When I think I’m starting to grasp it, I try it out and it pops up a ton of red errors.
like the example script in Unity’s reference.
transform.RotateAround (Vector3.zero, Vector3.up, 20 * Time.deltaTime);
that works well to rotate the object around the whole world, but I want it to orbit an object, so I tried adding the orbiting object as a child of the object I wanted it to orbit and then gave the child object the follow script to follow the main object but it just sat there, and didn’t move at all.
also I didn’t understand the script supplied in reference because
transform.RotateAround is the function right? and then the options are (Vector3.zero, Vector.up, 20 * Time.deltaTime);
so I thought, the three things are the vector3? (x,y,z) and so setting it to (2,5,20); would tell it to rotate around in a chaotic orbit, but instead it just yelled at me and said it didn’t understand what I was trying to tell it.