[XNA] map editor

Started by
0 comments, last by remigius 14 years, 1 month ago
I want to get a bit more familiar with XNA and how to work with the triangles and indices. Right now i can load a heightmap file and create a bumped terrain with it. But i would like to adjust the height of the terrain realtime, like in a level editor. Where can i find more information on bow to do thi?? Just by left clicking somewhere on my terrain. Thanks for any help.
Advertisement

Google is probably your best bet, there should be some resource out there. The basic idea is that you interect your terrain with your mouse ray and find the vertex closest to where the ray intersects the terrain. Combining the picking and heightmap collision samples should get you going. Once you have the vertex, you just update its position accordingly.

Rim van Wersch [ MDXInfo ] [ XNAInfo ] [ YouTube ] - Do yourself a favor and bookmark this excellent free online D3D/shader book!

This topic is closed to new replies.

Advertisement