Long ago I made a script that generates chunks for heightmap terrain. I never figured out how to displace an existing mesh, only how to generate a grid with its vertices globally bumped upward by noise. I'd like to know how to displace all vertices on a mesh in GDScript, in whichever direction their normals are facing.
For example: If I have a MeshInstance3D with a SphereMesh subdivided to the desired resolution of my planet: How would a script loop through all vertices and push or pull each vertice toward or away from the center of the sphere, based on the intensity of noise at its original location?
I'm not doing vertex displacement in a shader because I want the shape to have collisions and pathfinding, apart from other issues with large scale displacement in shaders. Please also specify how to generate the StaticBody3D/CollisionShape3D for the deformed mesh.