bros, can you just give me a hint of what's the way to do it, because I did some research and there seem to be more than one way of doing it.
1st way: Cast a ray down and check intersection with terrain.
2nd way: Divide the terrain to into grids and find the height of the terrain at the specific point I'm standing
3rd way: Screenshot the world from above and use the values from the depth buffer to get some terrain stuff. This is easiest, but it's bad, right?
EDIT: Actually, it's bad if I do it every frame, but I can do it only once and save to some image or something.
And just one more off-topic question, if you have time.
Guys, can't I just start using Unity because it will do most of the hard stuff for me. The reason is that I kind of make this game of mine for 5-6 months now and I don't see any results at all.
I'm kind of a patient person, but I spent all this time bothering with loading models, loading skeletal animation, wasting time with OpenGL API, figuring out how to manage game resources, making simple state machines for animation transition, Implementing aabbs and simple raycasting stuff, tinkering with shaders in order to add shadows and blinn-phong, bothering with quaternions in order to do interpolation, and ultimately my game still sucks 6 months later.
Do the skills I'm learning actually have any value, or I'm just doing all this for fun (not so much fun when debugging).