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 / Bogus (Get Martix Height) Problems - help please...

Author
Message
Northern Fist
20
Years of Service
User Offline
Joined: 23rd Sep 2003
Location:
Posted: 19th Oct 2003 23:12
Hi, I'm using DBClassic. I currently forming a game very similar in respects to cave-runner, but you fly inside the caves and shoot baddies in a third person craft (yeah, I know).

Collision techniques with the matrix walls of the cave have been disasterous. You see, the player is in control of his own y position - #y is not dependent upon the height of the matrix.



I've made two matrixes that scroll endlessly and have been randomized accordingly. They also are positioned to each other like sandwiched slices (like 60 units apart) with their sides pinched together. However, when I want to see how far the player is above the ground or below the ceiling of the matrixes I get obviously wrong answers. Heres my current (and wrong) way of getting those heights:



could someone please tell me the right way of doing this, please? I've been working on this problem for several weeks now.

"Power, precision, and don't forget about speed. If you practice everyday with these things in mind... you begin to develope A FIGHTING MODE." - Fist of Legend (Jet Li)
Northern Fist
20
Years of Service
User Offline
Joined: 23rd Sep 2003
Location:
Posted: 20th Oct 2003 01:37
Another thing to note, is that when I display the results of "distance_floor" or "distance_ceiling" in a text message, it only seems to change after the martices have shifted up.

I display the results of get ground height in working programs and the function's value change immediately with movement. Why doesn't it in my program?

"Power, precision, and don't forget about speed. If you practice everyday with these things in mind... you begin to develope A FIGHTING MODE." - Fist of Legend (Jet Li)
spooky
22
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 20th Oct 2003 01:40
have you done an UPDATE MATRIX command after the shift?

If your mansion house needs haunting, just call Rentaghost!
Northern Fist
20
Years of Service
User Offline
Joined: 23rd Sep 2003
Location:
Posted: 20th Oct 2003 01:49
There shouldn't be a need to. I used the "shift matrix up" command to make the 2 matrices scroll endlessly; according to the examples in the help files an "update matrix" command is unnecessary.

"Power, precision, and don't forget about speed. If you practice everyday with these things in mind... you begin to develope A FIGHTING MODE." - Fist of Legend (Jet Li)
Northern Fist
20
Years of Service
User Offline
Joined: 23rd Sep 2003
Location:
Posted: 20th Oct 2003 05:00 Edited at: 20th Oct 2003 06:23
One of my mistakes was found. Because the matrices move backwards while the players z value remains constant, then get ground height doesn't return anything viable. However, fixing this didn't appear to solve anything and I am just as frustrated as I was a week ago!

"Power, precision, and don't forget about speed. If you practice everyday with these things in mind... you begin to develope A FIGHTING MODE." - Fist of Legend (Jet Li)
spooky
22
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 20th Oct 2003 13:07
Aha you said the magic words! matrix heights are relative to matrix origin, not world orgigin. So just deduct matrix position from get height command, thus:

if you say:

get ground height(1, x#, z#)

change to

get ground height(1, x#-matrix position x(1), z#-matrix position z(1))

If your mansion house needs haunting, just call Rentaghost!
Northern Fist
20
Years of Service
User Offline
Joined: 23rd Sep 2003
Location:
Posted: 22nd Oct 2003 01:35
Thanks a bunch. I used to think in error that ground height was relative to the world x, z position. Thanks for setting me straight on this.

"Power, precision, and don't forget about speed. If you practice everyday with these things in mind... you begin to develope A FIGHTING MODE." - Fist of Legend (Jet Li)

Login to post a reply

Server time is: 2024-09-21 05:36:51
Your offset time is: 2024-09-21 05:36:51