Archived

This topic is now archived and is closed to further replies.

pentestoy

how do I combine model/terrain rendering?

Recommended Posts

I have written a simple terrain engine and a model viewer, and I have a character model and a heightfield for terrain to experiment with. My next logical step is to combine the model/terrain renderers into one program. But I''m unsure of how to control the character''s position. I can have the character move around in response to cursor key/mouse input, but how should I implement keeping it on the ground? Should I reference it''s location relative to the heightfield, interpolating between the field''s points; read up on triangle/triangle collision detection, and implement that; or is there some other, better way? The first option was just me brainstorming--I don''t know how well it would work. The second option seems like it would be computationally expensive as more models are added to the engine (I eventually want to implement opposing squads of characters), but that''s just a gut feeling I have. Any advice on how to proceed would be greatly appreciated. Thanks. pentestoy

Share this post


Link to post
Share on other sites