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 / collision with a heightmap matrix

Author
Message
tikki
17
Years of Service
User Offline
Joined: 1st Aug 2007
Location:
Posted: 2nd Aug 2007 18:41
i have been wondering how to mkae the heightmap code work with my current fps setup. i found the heightmap code in some other tutorial then the FPS one i was using, but i thought i could figure out how to apply it since i figured out how to add jumping/gravity.
heightmap:

FPS (thanks ruccus):


the only problen i see is this: groundDistance# = INTERSECT OBJECT(5,x#,y#,z#,x#,-2000,z#)
because a matrix isnt an OBJECT sooooo, its not checking for the matrixes number. how could i work around that? will i need a whole new jumping/gravity code?
i tried SPARKY's .dll, but after i installed it EXACTLY as the readme said, still NO commands work. i get errors.

thanks!

RAWR!
Jane Doe
17
Years of Service
User Offline
Joined: 29th Jun 2007
Location:
Posted: 2nd Aug 2007 21:05
Quote: "GET GROUND HEIGHT

This command will calculate and return the Y coordinate within the matrix given the X and Z coordinates. This command can be used to allows 3D objects to traverse the contours of any matrix landscape with ease. The matrix number should be an integer value. The coordinates should be real numbers.

Syntax

Return Float=GET GROUND HEIGHT(Matrix Number, X, Z)"


- Jane
tikki
17
Years of Service
User Offline
Joined: 1st Aug 2007
Location:
Posted: 2nd Aug 2007 21:44
thanks for the help but:
i took out
and put a couple different things to try.
1st i tried:
GET GROUND HEIGHT 1, segments,segments
then
GET GROUND HEIGHT 1, x#,z#
then
GET GROUND HEIGHT 1, OBJECT POSITION x(1),OBJECT POSITION Z(1)
all returned with error: "could not understand command at line 94"
i put in the do/loop section

i replaced the `ground stuff with the heightmap stuff
"sorry for being a noob "

RAWR!
Sixty Squares
18
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 3rd Aug 2007 04:37
groundDistance#=GET GROUND HEIGHT(1,x#,z#)

I think you forgot the () around it.

tikki
17
Years of Service
User Offline
Joined: 1st Aug 2007
Location:
Posted: 3rd Aug 2007 07:09
thanks sixty, i sure was missing the (), and i read most of the stuff about matricies and realised that is the command i do need. but i STILL keep falling through the matrix. when i start out i am clearly over the matrix, and the matrix is at 0,0,0 (i even did position matrix 1,0,0,0 to be safe).
here is the compiled:

<remove lines 21,23,28 if you dont want to download the 100kb file>
heres the .zip: http://host-a.net/t1kk1/fps.zip]Download fps.zip

i really apreciate your help

RAWR!

Attachments

Login to view attachments
tikki
17
Years of Service
User Offline
Joined: 1st Aug 2007
Location:
Posted: 25th Aug 2007 19:07
23 day bump
can any1 please help me? the file is attatched and is really small size

i now have sparky's DLL, so u can use that if you want

thanks

RAWR!

Login to post a reply

Server time is: 2024-11-26 11:22:44
Your offset time is: 2024-11-26 11:22:44