Quantcast
Channel: Latest Questions by Monko
Viewing all articles
Browse latest Browse all 34

How to draw triangles with coordinates

$
0
0
Hello. I have set up a 3 dimensional array, which is used to "cover" the whole map with a 3d grid. The array is Boolean, so each coordinate is turned on or off. I want to make it so whenever an area of coordinates are turned "on", they create a mesh around them self, that the player collides with and can walk around on. Whenever I turn on another coordinate near it, the mesh adjusts accordingly. Whenever I turn off a coordinate inside the mesh, the mesh creates a hole accordingly. This way, the player can "dig" into a set coordinates, with a realistic mesh that appears to have a newly dug hole. I am not sure where to start off, because I am not familiar with working with meshes. SO to sum things up, im asking for help creating code that will draw a mesh around given coordinates. (x,y,z) (For example, if I turn on one coordinate, i will see a cube. If i turn on 2 next to each other, I will see a rectangle. But if i turn on coordinates in the shape of a sphere, I will see a smooth sphere, not a blocky one). Even if you don't know how the mesh generateing around the coordinates works, any help on creating a triangle given 3 coordinates will be helpful.

Viewing all articles
Browse latest Browse all 34

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>