Advertisement Jump to content
Sign in to follow this  

OpenGL Draw a circle on a terrain

This topic is 2634 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hey there,

I'm making some tools to edit a terrain in real time, I used UDK and cryengine3 SDK once and i really liked the idea of a circle being projected into a terrain so you could see the parts of the terrain that will be elevated, something like this:,r:13,s:15

So i was thinking in a good way to do this, but I want some opinions...

First of all, my terrain is a mesh maded of triangles, so the idea was:
-Find the coordinate my mouse is pointing at, I was thinking of try to pick the triangles and check if I picked any of them, if i do i could read his coordinates with an openGL function
-After that I should find some adjacent triangles and check if some of their coordinates are still inside my circle, if they are I could calculate some coordinates from my circle to draw it

I believe there are better ways to do this, if that's true I would like to read some feedback, thank you.

Share this post

Link to post
Share on other sites
Use decals, for example ->

Just google for decals or search the forums and you'll find lots of resources.

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!