Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6546627
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T11:43:51+00:00 2026-05-25T11:43:51+00:00

I am using openGL ES. I have loaded a ball, skybox, and a small

  • 0

I am using openGL ES. I have loaded a ball, skybox, and a small patch of terrain into the program.

The terrain changes heights at certain points.
The ball rolls around the terrain.

My question is: is there any way I can tell what the height of the terrain is at the position of the ball? (The position of the ball is stored in a variable that can be used). Is there any sort of OpenGL ES command, or even an OpenGL command I can base some research of this into?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T11:43:52+00:00Added an answer on May 25, 2026 at 11:43 am

    OpenGL is a rendering API, it just draws things onto the screen, nothing more. So you won’t get around doing such things like terrain collision detection and the like yourself.

    If you got a heightmap for the texture (e.g. you draw a x-z regular grid with the y taken from a heightmap). You can just search for the cell your ball is in (or better the triangle the ball is in of the two triangles) and interpolate the corresponding height values to get the height of the terrain at the ball’s position.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have made a small opengl program using the d programming language. what i
I am a beginner at using openGL. I have used a program which I
I am writing a graphics program in C/C++ using OpenGL. I have a bunch
I'm having issues trying to get a texture loaded into VRAM. I'm using OpenGL
I have done a graphics project using OpenGL and now I want to convert
I have a funny event with one application in development using OpenGL ES on
I have a multithreaded application. However I noticed, I'm using OpenGL and this should
I have a SWT app that opens a OpenGL window (using the LWJGL library)
I have some Qt applications rendered using OpenGL on surfaces provided by an EGL
I have some (OpenCV) code that generates images. I'm displaying these using OpenGL. When

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.