I have created a height field editor, I now wish to select a tree button in the app then when I click the mouse button on the terrain it places a tree exactly on the x,y,z of that piece of terrain.
anyone?
I have created a height field editor, I now wish to select a tree button in the app then when I click the mouse button on the terrain it places a tree exactly on the x,y,z of that piece of terrain.
anyone?
Hi IronDuke !
I think you could do it using the depth buffer : I assume you know the X,Y coordinates of the point that has been clicked !
Then, spaceX,spaceY and spaceZ contain the coordinates of the point clicked on the landscape !
I use this method in most of my programs for picking and transforming objects (translations/rotations).
Hope it helps.
Regards.
Eric
I understand what you mean, if you have the time perhaps you could go into a little more detail?
thanks !!! it works fine !!!
hey im try to make the same thing but im realy dont understend.