Sign in to follow this  
vivendi

[XNA] map editor

Recommended Posts

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this