I’m working on a flight simulator, and I’ve encountered a challenge: my aircraft can go below the terrain level and I want to prevent this from happening.
I’ve been checking the terrain height below the aircraft and comparing it to the aircraft’s altitude to prevent this, but it doesn’t feel like an elegant solution.
Ideally, I want the terrain to behave like a solid wall, similar to what you see in many games.
Any tips or resources you could share would be greatly appreciated!