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!

  • \$\begingroup\$ 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? \$\endgroup\$
    – gardian06
    Apr 29, 2012 at 17:27
  • \$\begingroup\$ What's wrong with polyhedrals? \$\endgroup\$
    – ashes999
    Apr 30, 2012 at 0:18
  • \$\begingroup\$ 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. \$\endgroup\$ Apr 30, 2012 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.

  • \$\begingroup\$ I already did that before I even asked, but thanks anyway. \$\endgroup\$
    – Taylor
    May 3, 2012 at 16:21
  • \$\begingroup\$ 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. \$\endgroup\$ May 4, 2012 at 17:54

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .