Hello
im building a world in irredit with a terrain and some houses.
Now i have modeled a character and want him to move on the map when i click on any position on the terrain.help please!!!!!!!!!!!!!
mfg
HELP!!! moving characters on terrain when click on it....
-
- Posts: 1
- Joined: Sat Feb 24, 2007 5:20 pm
Read this first, http://irrlicht.sourceforge.net/tutorials.html
i suppose that more tutorials will be coming very soon.
i suppose that more tutorials will be coming very soon.
http://irrlicht.sourceforge.net/docu/cl ... _node.html
http://irrlicht.sourceforge.net/docu/cl ... nager.html
http://irrlicht.sourceforge.net/docu/cl ... nager.html
Get the terrain node's mesh (TerrainSceneNode class). Make an ITriangleSelector (in the SceneManager class, maybe an octtree one) from that mesh. If the user clicks, find a ray by using getRayFromScreenCoordinates (CollisionManager class). Get the collision point using the getCollisionPoint function (CollisionManager class). Set the entity's position to the vector3df that you specified.
But don't take my word for it, I'm a noob, haha.
http://irrlicht.sourceforge.net/docu/cl ... nager.html
http://irrlicht.sourceforge.net/docu/cl ... nager.html
Get the terrain node's mesh (TerrainSceneNode class). Make an ITriangleSelector (in the SceneManager class, maybe an octtree one) from that mesh. If the user clicks, find a ray by using getRayFromScreenCoordinates (CollisionManager class). Get the collision point using the getCollisionPoint function (CollisionManager class). Set the entity's position to the vector3df that you specified.
But don't take my word for it, I'm a noob, haha.