How to find the height at a point in the TerrainSceneNode

Irrlicht.Net is no longer developed or supported, Irrlicht.Net Cross Platform is a much more complete wrapper. Please ask your C# related questions on their forums first.
Locked
MindGames
Posts: 32
Joined: Sat Jul 16, 2005 2:02 am

How to find the height at a point in the TerrainSceneNode

Post by MindGames »

I want to be able to add scene nodes to the terrain scene node but I need to know what height the terrain is at the point I am to add them so that they are not flying or below ground.

Anyone know how to do this? Is this one of those things not yet converted over?

If it isn't converted, what is the C++ method so I can just convert it myself.

Thanks for your help
Guest

Post by Guest »

are you using an fps camera?

Why dont you just take the z value of the camera, and that will give you the height that the camera is currently at?
Thorben Linneweber

Post by Thorben Linneweber »

i think you have the x and z value of the terrain (the ground) and you want to have the height of the terrain at this position?

Then you easily can use the GetCollisionPoint Function... Look in the documentation how to use it...
MindGames
Posts: 32
Joined: Sat Jul 16, 2005 2:02 am

Post by MindGames »

Guest - No I am not using an FPS camera. I have a camera flying over the terrain. That part mostly works ok. I am doing a strategy game with a 3D map and lots of units wandering around under the control of the AI

Thorben - Thanks, that was what I was looking for. I will give that a try. Do you know how fast it is?
Locked