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.

3 Dimensional Chat / Reading the height of .3ds models like "get ground height" does for matrix

Author
Message
Fusion
22
Years of Service
User Offline
Joined: 1st Dec 2002
Location: UK
Posted: 18th Nov 2003 01:25
How do i read the height of an object at a specific point like get ground height does?

I am making a race game, and have modelled a basic map and need the car to follow the road and ramps etc, so i need to know the heights

P4 3 GHZ, 1GB DDR RAM, ATI RADEON 9700 PRO, SB AUDIGY 2 EXT, PIONEER DVD-R, PLEXWRITER 48x, 18.1" TFT Monitor. "PON DE RIVER, PON DE BANK" YUP! GOOD TA GO!
richardneail
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 18th Nov 2003 14:51
You would use the intersect object command.

search the DBP discussion forum there is a post on there of mine with some sample code.

Rich

You might never win but if you give in will you ever know ??????
Xander
22
Years of Service
User Offline
Joined: 3rd Mar 2003
Location: In college...yeah!
Posted: 19th Nov 2003 06:10
This is much easier than that. You don't need any intersect object stuff.

Center=object position y(objectnum)
Botton=object position y(objectnum)-object size y(objectnum)/2.0
Top=object position y(objectnum)+object size y(objectnum)/2.0

However, this only works if the "center" of the object is really at its center. Some model's "center" is at the bottom of the model, so you don't need to subtract half of its height to find the bottom, but you will need to add its entire height to find the top.

Get it?

Good luck, Xander

Xander - Bolt Software

Why do the antagonists always have to look so cool?
richardneail
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 19th Nov 2003 18:43
Not much use if you want to tilt the object to the surface of the other object as in the racing game he is making like going over a ramp and what is hard about using the intersect object command?

Rich

You might never win but if you give in will you ever know ??????

Login to post a reply

Server time is: 2025-06-27 09:02:10
Your offset time is: 2025-06-27 09:02:10