Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I'm having difficulties with my project. I'm quite new in XNA. Anyway, I'm trying to make 3D game and I'm already stuck on one basic thing. I have terrain made from a heightmap, and an avatar model. I want to set up some collisions for game so the player won't go through the ground. But I just don't know how to detect collisions for so complex an object. I could just make a simple box collision for my avatar, but what about the ground?

I already implemented the JigLibX physics engine in my project and I know that I can make a collision map with heightmap, but I can't find any tutorials or help with this. So how can I set proper collision for complex objects? How can I detect heightmap collisions in JigLibX? Just some links to tutorials would be enough.

Thanks in advance!

share|improve this question
    
unless you need pixel-perfect collisions why cant you put you "avatar" into a simplified bounding volume. though I would suggest a sphere over a box considering that a box is just a simple polyhedral, and even with fast algorithms you want to avoid polyhedrals if possible. and shouldn't this info be in the documentation of the engine? –  gardian06 Apr 29 '12 at 17:27
    
What's wrong with polyhedrals? –  ashes999 Apr 30 '12 at 0:18
    
I think gardian meant that with a polyhedral you'd have more area in contact with the terrain at all times (a flat edge, usually), which, depending on the algorithm, could be slower than having more of a concentrated point with a sphere (since it's round). Although, I don't really think that's the case usually. Regardless, a sphere is usually more accurate for 3D objects anyway. –  electroflame Apr 30 '12 at 0:29

1 Answer 1

I suggest you take a look at the official JigLibX wiki, located over here.

Specifically, you may want to take a look at the quickstart guide from the wiki, located here.

There are plenty of articles on the wiki that should help you out. Otherwise, you might want to check out their forums for related posts.

share|improve this answer
    
I already did that before I even asked, but thanks anyway. –  Taylor May 3 '12 at 16:21
    
Oh, I'm sorry. Perhaps you should put that in your original question, then. The wiki is kind of the de facto source of JigLibX info, so that'd be important to note in your question. –  electroflame May 4 '12 at 17:54

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.