Ok so suppose I have a terrain from a heightmap and it has a hill.
How can i place a AnimatedMesh,without setting the y pos.
Like just specify x/z and it locates the y of the hill and places the model (tree for example) on top of it.
Placing on terrain
Re: Placing on terrain
Hm, by doing something called programming.
1) Open up irrlicht api if you don't know what things can you do with each class/function or don't know if there is a class/function for that.
2) Find class/function. (http://irrlicht.sourceforge.net/docu/cl ... _node.html)
And this might be just the function you need:
1) Open up irrlicht api if you don't know what things can you do with each class/function or don't know if there is a class/function for that.
2) Find class/function. (http://irrlicht.sourceforge.net/docu/cl ... _node.html)
And this might be just the function you need:
Use it to get the height and place your tree or w/e you want there.virtual f32 getHeight (f32 x, f32 y) const =0
Get height of a point of the terrain.
Working on game: Marrbles (Currently stopped).
Re: Placing on terrain
This I know very well.
My question was,IS there another way like the one I mentioned earlier ?
My question was,IS there another way like the one I mentioned earlier ?
Re: Placing on terrain
And what exactly did you mention?Elfinitiy wrote:This I know very well.
My question was,IS there another way like the one I mentioned earlier ?
Working on game: Marrbles (Currently stopped).
Re: Placing on terrain
Something similar toLike just specify x/z and it locates the y of the hill and places the model (tree for example) on top of it.
Attaching a weapon to the camera.
I don't locate the camera position and then set the weapon pos to camera.pos+weapon.pos,but specify the weapon position from the camera perspective directly.
Something similar here
-
- Admin
- Posts: 14143
- Joined: Wed Apr 19, 2006 9:20 pm
- Location: Oldenburg(Oldb), Germany
- Contact:
Re: Placing on terrain
Well, it does not work automatically, but adding just two calls (one getHeight on the proper position and then the setPosition on the node with the new height) seems to be pretty easy. Why don't you use that?
Re: Placing on terrain
Because when I think of something,I always know there has to be a better way.hybrid wrote:Well, it does not work automatically, but adding just two calls (one getHeight on the proper position and then the setPosition on the node with the new height) seems to be pretty easy. Why don't you use that?
Too bad its the only way thou
Re: Placing on terrain
try a collision response animator, will be done automatically.