cpyburn:height maps are not an option, never will be. I have caves and rooms and multiple levels of height. I have worked with height maps and they work great for one plane of triangles but for this project i need triangle/ray collision functionality with the ground. it cant be that hard, infact i know i am close, i can move around my world and bounce off the ground, but i want to move smoothly.
Oh, it can be that hard, and that is why there are physics engines.
Let us say you have a 3D terrain (not a heightmap), that you're standing on, and let us also say this terrain is roughly 2 million polygons. Do you check all 2 million triangles against your character each frame? No way. You'll need algorithms to cull out sections of models/terrain that you don't want to collide with. This means the terrain will most likely need to be processed when it is loaded into an oct-tree or quad-tree. You'll need to do broadphase/narrowphase checks on it.
I'm literally just listing the few things that come to mind at first.
You might look into using something like JigLibX rather than set all of this up on your own, unless your goal is to specifically learn game physics in detail.
XNA QuickStart Engine |
My site"I'll be whatever I want to do!", Philip J. Fry