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.

Dark GDK / .x levels

Author
Message
randal
16
Years of Service
User Offline
Joined: 18th Nov 2008
Location:
Posted: 5th Aug 2009 11:35
I would like to create 3d levels in x format, but how would I determine in dgk what the current height of the object's vertex is in certain positions? Something similar to dbGetTerainHeight()?
david w
18
Years of Service
User Offline
Joined: 18th Dec 2005
Location: U.S.A. Michigan
Posted: 6th Aug 2009 17:40 Edited at: 6th Aug 2009 17:41
Well there are a number of possibilites in this situation that I can think of off the top of my head.

#1 use Sparkys collsion.
#2 use DBP built in intersect command.
#3 Get Position, Rotation, Scale. Loop through the entire vertex data(or relative to position) test and find the locations of the vertex and compute the triangle face angle and that will give you the x,y,z position of your virtual intersection.
#4 store all heights in an array and interpolate the approximate value based on location rotation and scale. (this could easly be done rendering a top down view and storing the heights in a floating point look up array)( say you have a world 10000x10000, make an array 1000x1000 and store each points Y value and interpolate accross to get approximate height) for more accuracy use a higher detail array)


with #1 and #2 being the easiest methods available, I would suggest those. good luck
randal
16
Years of Service
User Offline
Joined: 18th Nov 2008
Location:
Posted: 11th Aug 2009 14:36
thanx for the reply david.

#1 does sparkys work on complex objects, such as levels?

#3 can you perhaps give me the function names to use to find the vertex data?
tomtetlaw
15
Years of Service
User Offline
Joined: 18th Jan 2009
Location:
Posted: 11th Aug 2009 14:51
Sparky's does work with complex objects, SC_SetupComplexObject

#ifdef __NEWBIE__
MakeAnAwesomeGame(lots of badies, lots of guns, lots of stuff to do, BIG level)
#endif

Login to post a reply

Server time is: 2024-11-20 17:35:46
Your offset time is: 2024-11-20 17:35:46