Position gameObjects in circle around another gameObject

I am currently working on a game (in VR for Oculus Quest) where I have different platforms on which the player can stand. To these platforms belong a number of spheres, that should be placed in a circle around the center of each platform (a little bit above so that they are at a good spot to be grabbed by the player.
My problem is that whatever I do, the spheres are always placed around the center of the world instead.

Currently the code where i’m positioning the spheres looks like this:

float angle = counter * Mathf.PI * 2f / spheres.Count;
Vector3 newPos = new Vector3(Mathf.Cos(angle) * 0.5f, 0.5f, Mathf.Sin(angle) * 0.5f);
sphere.GetComponent<Transform>().localPosition = newPos; 

The script is placed on each platform and the code is within a foreach loop where I go through all spheres that have determined to belong to the platform.

I would really appreciate some help, so if you need any other information to help me with the problem, feel free to ask. I’m quite a beginner, but I’ll try my best to provide the information. :slight_smile:

Make sure it’s not a strange case where the pivot point of your platform is at world 0,0 . Or perhaps the actual physical platform object is a child of a parent game object, and you have the script on the parent?
These are off the top of my head outlier cases where I’ve experienced positioning issues.