Terrain collision detection

rated by 0 users
This post has 2 Replies | 2 Followers

Top 200 Contributor
Posts 12
SunBurn_Pro_Licensee
freeflyklown Posted: 08-29-2010 1:55 PM

Hi,

how would I best check for collision detection between a model and the new terrain object? I want my player to always walk on the terrain. Is there any example of this?

Top 10 Contributor
Posts 4,546
Employee
SunBurn_Studio_Licensee

Hi freefly,

Are you using a particular physics system?  If so does it support height map collisions (I believe JigLib, Oops, bepu, and others support this)?

If you are not using a specific physics system check out the XNA CC Heightmap Collision sample - it has an excellent example of object to height map collisions, which can be used to collide with the SunBurn terrain using its height map.

Let me know if this helps!

Follow me on Twitter – development and personal tweets
Awesome XNA Videos – Lighting, Rendering, and game videos

Top 200 Contributor
Posts 12
SunBurn_Pro_Licensee

Hi John,

thanks for the fast reply. I check out the sample. I am not using any physics engine...I'm doing a rather simple snake game ;-).

Page 1 of 1 (3 items) | RSS