I have the terrain and resource generation working but the resources are spawning above the planet apart from the planet that was already spawned in. They are all the same planet and use the same blueprints to spawn the resources and I can’t figure out why they’re spawning above the planet.
Pre spawned planet with working resource generation -
I know they’re slightly above but that’s fine for now
These are the planets that are spawned in through code and don’t have working resource generation -
This is the code used -
My second question is would it be possible to make the material I use to make the terrain be solid or shape the mesh to it so I can walk over it instead of going through it.
That is adding the Z world location to the amount the resources are being offset, I think you will find it works if you remove that, and just plug the radius value in directly.
Are you sure the radius value is accurate? How is that being set?
Are the meshes in the resources correctly positioned so that their base point is at 0,0,0?
Just as a test, set your radius 10,000, and confirm that the radius of your mesh is also 10,000 units in game, measure it to check.
I’m presuming you are setting the size of the planet to match this radius, but maybe it is not accurate.
The test worked and the radius is fine. The trees are spawning at the surface but the resources and at the very center of the planet. The resources and trees both use the same blueprints