Simple collision against heightmap

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
Valmond
Posts: 308
Joined: Thu Apr 12, 2007 3:26 pm

Simple collision against heightmap

Post by Valmond »

Hi !

I'd like to check for collisions in a "manual" way and decide what should happen to my camera when that happens.

What would the easiest way be to check say an ellipse (or circle) against a height map ?

Secondary, same question but with an arbitrary mesh.
Moo
Posts: 30
Joined: Fri Jan 09, 2009 10:07 pm

Post by Moo »

You can take a look at:
Tutorial #12. Take a specific look at the part that says
If you need access to the terrain data you can also do this directly via the following code fragment.
. Good luck!
rogerborg wrote:Answering a noob question is like having sex with a midget: there's a wonderfully satisfying sensation of being a giant.
Brainsaw
Posts: 1177
Joined: Wed Jan 07, 2004 12:57 pm
Location: Bavaria

Post by Brainsaw »

There is a function in the terrain scenenode that gives you the height on a specific (x,z) position. That should help you.
Dustbin::Games on the web: https://www.dustbin-online.de/

Dustbin::Games on facebook: https://www.facebook.com/dustbingames/
Dustbin::Games on twitter: https://twitter.com/dustbingames
Valmond
Posts: 308
Joined: Thu Apr 12, 2007 3:26 pm

Post by Valmond »

I'm already using the height() making my player go up hills and so but the terrain->getMeshBufferForLOD(...) is probably what I need, thanks for the helps !
Post Reply