So I’ve been trying to tackle this issue for months now…
I have a ship I want to spawn on the seafloor. The seafloor sprite has slopes. I want the ship to land on the seafloor and align itself properly with the slope of the seafloor. Trick is to do this without gravity or preset positions. Any way I can do this?
The way I’ve done it is to apply gravity and have gravity do the job. The problem with this is when I speed up the fish, the ship can be seen tilting itself to align with the seafloor. I do not want that to be seen. I want the ship to always be aligned by the time it is visible on screen.
The other way I’ve done it was to have a few preset positions for the ship to spawn at (with preset Y position and Z rotation). The problem with this however is (a) the seafloor moves over time as it teleports periodically, which cancels out the benefit of having preset positions, and (b) it’s not as random as I would like it to be.
Is there ANY way to just have the ship know how to align itself with the slope of the seafloor without using gravity?
I’ve read some on Raycast and was suggested to use it, but I can’t seem to get it to work in my 2D game. Am a Raycast noob. ![]()
Any help would be greatly appreciated!!
- Chris