You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've I am wondering how to do about spawning the ship on the surface of earth. Moving the spawnPoint doesn't seem to do anything, and its unclear how to get the position of a StellarBody
The text was updated successfully, but these errors were encountered:
Currently you can't do that without changing any of the scripts. The demo wasn't setup to do this.
In order to spawn on earth, you can't actually place a spawn point in the scene. Planets are created and simulated from code.
Assuming you have a longitude/latitude you want to spawn at, it may be possible to spawn the player in a disabled state at a "best guess" location (taking planet radius into account), and then wait for ground to load around. As loading happens, a raycast may be used to determine a good location above ground once it loads, and move the player there. Finally, the player could be enabled once conditions are right (that can be as soon as ground collision is detected, or when the area becomes editable).
The demo also handles origin shifting when getting close to planets. There might be something to take into account there if the player starts directly on a planet, but I'm not sure.
You will need to dig into the source to figure out how to do this.
Description
I've I am wondering how to do about spawning the ship on the surface of earth. Moving the spawnPoint doesn't seem to do anything, and its unclear how to get the position of a StellarBody
The text was updated successfully, but these errors were encountered: