Orientation of objects on a sphere surface

Hi,
I’m trying to place Planes on a Sphere surface but I want the planes to be aligned with the sphere center and squared to the surface (like trees on a planet).

I tried several approaches but none seem to work e.g. using lookAt(%sphere_center%) or with the space coordinates getting the phi an theta and apply them as a rotation

const pos = geoCoordTo3Dposition(ep.location.latitude, ep.location.longitude, 200);
const sp = new Spherical().setFromCartesianCoords(pos.x, pos.y, pos.z); 

// then use rotation like [sp.phi, sp.theta, 0] on my mesh

So I’m wondering what is the best way to get the correct rotation of my object based on its position.

Thanks,
G.

Hi!
You can find many examples on @hofk 's site: * discourse.threejs.hofk.de

And these are amongst them:

  1. Planes on Sphere
  2. Trees on Sphere
1 Like