HM_SIZE_X and HM_SIZE_Y are both 6
We get it. We use ad blockers too. But GameDev.net displays them so we can continue to be a great platform for you.
Please whitelist GameDev.net and our advertisers.
Also consider a GDNet+ Pro subscription to remove all ads from GameDev.net.
OpenGL API Specifications
Documents and Learning ResourcesSupport Libraries and FrameworksFunction Libraries and GeneratorsThis list contains some basic resources for getting started with, and developing for, OpenGL 3.0 and onwards. Contact your forum moderator if you want to contribute to the list or have any comments.Subscribe to GameDev.net's newsletters to receive the latest updates and exclusive content.
Posted 18 February 2017 - 09:53 AM
Posted 18 February 2017 - 02:44 PM
You know where you vertices are.
You know the size of a quad.
You know where the camera is.
From there you can determine which quad the camera is in. ( camera x - mesh x ) / quad size = quad x. similar for z.
and from there you can determine which triangle of the quad the camera is in.
from that you can lerp down the two sides of the triangle, then lerp between those results to get the height of the triangle at the camera's location.
Norm Barrows
Rockland Software Productions
"Building PC games since 1989"
PLAY CAVEMAN NOW!
http://rocklandsoftware.net/beta.php
Posted 20 February 2017 - 11:45 AM
You know where you vertices are.
You know the size of a quad.
You know where the camera is.
From there you can determine which quad the camera is in. ( camera x - mesh x ) / quad size = quad x. similar for z.
and from there you can determine which triangle of the quad the camera is in.
from that you can lerp down the two sides of the triangle, then lerp between those results to get the height of the triangle at the camera's location.
How would I determine which triangle of the quad the camera is in?
GameDev.net™, the GameDev.net logo, and GDNet™ are trademarks of GameDev.net, LLC.