Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / How can I find the height of a model at a specified x and z

Author
Message
Sodevrom
19
Years of Service
User Offline
Joined: 10th Jul 2005
Location: Timisoara
Posted: 1st Sep 2005 00:01
Hello , I have a terrain that is not a terrain , it is a .x model with bumps , just like a heightmap . I wan to know how can I know the height of my model at a specified x and z coordinates ? I need something like GET TERRAIN HEIGHT(Terrain Number, X, Z) but for 3D models (.x) and not heightmaps .

I am a Sodevrom team member .
Visit www.sodevrom.com for free games & software
And don't forget : We make what you only imagine
General Sephiro
20
Years of Service
User Offline
Joined: 27th Sep 2004
Location:
Posted: 1st Sep 2005 05:45
I believe RPGamer described how to do this... since it's an object, it should work in theory... aint tried it out though, hope this helps:

http://forum.thegamecreators.com/?m=forum_view&t=59975&b=7

function findObjectTop(objectNum)
xPos = Object Position X(objectNum)
yPos = Object Position Y(objectNum)
zPos = Object Position Z(objectNum)
CenterX = xPos - Object Size X(objectNum)/2
CenterZ = zPos - Object Size Z(objectNum)/2
TopY = yPos + Object Size Y(objectNum)
endfunction TopY : `you could use an array to get the center X/Z Positions as well

Sodevrom
19
Years of Service
User Offline
Joined: 10th Jul 2005
Location: Timisoara
Posted: 1st Sep 2005 17:26
How can I do this ? nobody knows ? Ireally really need this

I am a Sodevrom team member .
Visit www.sodevrom.com for free games & software
And don't forget : We make what you only imagine
SimSmall
20
Years of Service
User Offline
Joined: 7th Aug 2004
Location: United Kingdom
Posted: 1st Sep 2005 20:06
if object position y() won't do, then I don't know -- I've never used .x landscapes. Only matrices...

...maybe one day I'll finish a project
Sodevrom
19
Years of Service
User Offline
Joined: 10th Jul 2005
Location: Timisoara
Posted: 2nd Sep 2005 01:32
No , position y is no good , becouse it tells me the y position of the entyre model .I only want to know the y position at a specified 2 points x,z

I am a Sodevrom team member .
Visit www.sodevrom.com for free games & software
And don't forget : We make what you only imagine
Flashing Blade
22
Years of Service
User Offline
Joined: 19th Oct 2002
Location: United Kingdom
Posted: 4th Sep 2005 20:21
Intersect Object() is the command you want.

Also you might want to check out Nucleur Glory's collision DLL.


The word "Gullible" cannot be found in any English Dictionary.

Login to post a reply

Server time is: 2024-11-27 18:37:04
Your offset time is: 2024-11-27 18:37:04