I've created a terrain object and a car object using 3dMax, and converted them into my3d, and load them separately in Irrlicht Scene.
The car named: carNode, and the terrain named: terrainNode, and also created a FPS camera in Irrlicht named: cameraNode.
Now the cameraNode collide with both terrianNode and CarNode, and i've also created a collision response animator between the car and the terrain.
But what i need now is "HOW to make the car moves ABOVE the terrain?!" ... the path is not critical here .. i just want it to move above it just like in real world, when it face a hill; it will go up, when i face a slope; it will go down.
Any help please! ....
How can i make a SceneNode moves above a Terrain!
-
- Posts: 9
- Joined: Sun May 07, 2006 2:22 am
- Location: Dlut.Dalian.China
Thats easy
For simple use,U can just get the vertical position "iGroundPos" of the Terrian at every beginning of a frame,&keep a certain distance from "iGroundPos".
HI.I'm Chrisalane.Nice to meet many crazy game developer here.
Ah, I thought you want the car to lean back when it goes up a hill and so on... If you just want the car to move above the terrain, just use the collisionResponseAnimator.
EDIT: I think the ResponseAnimator is a lot easier than dealing with the ground pos and so on - especially if your terrain is a model.
EDIT: I think the ResponseAnimator is a lot easier than dealing with the ground pos and so on - especially if your terrain is a model.