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 / get ground height flux

Author
Message
Magefire
21
Years of Service
User Offline
Joined: 20th Feb 2003
Location:
Posted: 1st Mar 2003 02:37
When I call the Get Matrix Height, the height jumps around from normally around -1000 to 1000. After your camera is no longer on the matrix and is going backwards, it can get up to about 30000. Some of my code is as follows and I was wondering if anyone could help solve my problem of making it so that the height can make the camera or object a bit above or on the matrix.

sometimes, if I divide the result by 100, the camera shakes as the numbers appear to be randomly moving as opposed to about 3 days ago when the numbers would increment smoothly and slowly. The matrix I am using is randomized.
Morales
21
Years of Service
User Offline
Joined: 9th Feb 2003
Location: - Please Select -
Posted: 1st Mar 2003 02:57
try [get ground height()]
Magefire
21
Years of Service
User Offline
Joined: 20th Feb 2003
Location:
Posted: 1st Mar 2003 03:01
No, that doesn't work.
[get ground height()]
and
get ground height()
don't work
neither of these had any parameters. Could you give me the full line of code that I should use so that it would work normally?

andrew11
21
Years of Service
User Offline
Joined: 23rd Feb 2003
Location: United States
Posted: 1st Mar 2003 03:21
The code is:



X and Z are the character's (or camera's) position on the matrix.

"All programmers are playwrights and all computers are lousy actors."
-Anon.
spooky
22
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 1st Mar 2003 15:35
Your biggest problem was getting height of where you were BEFORE moving the camera. You also need to add a bit to 'y' position to make camera 'hover' above matrix



Gronda, Gronda
Magefire
21
Years of Service
User Offline
Joined: 20th Feb 2003
Location:
Posted: 2nd Mar 2003 00:00
Thanks for all the help. It turned out that none of my code was bad (well maybe I won't go that far) since after I upgraded to version 3.1, everything worked perfectly.

If you give a man some fire, he will be warm for a day. If you set a man on fire, he will be warm for the rest of his life.
QuothTheRaven
22
Years of Service
User Offline
Joined: 2nd Oct 2002
Location: United States
Posted: 2nd Mar 2003 04:50
btw, you botched your sig

"if you teach a man to make fire" is the right way.

giving fire? wtf?

Darken the skies, we are god
The Darthster
22
Years of Service
User Offline
Joined: 25th Sep 2002
Location: United Kingdom
Posted: 2nd Mar 2003 22:38
It's supposed to be funny, from one of the Terry Pratchett Discworld books, Jingo? Where the father and son are on the island? Anyway, I think it should be 'set a fire for a man'. Teaching a man to make fire would defeat the point of the joke.

For some reason using DBv1.13 I can't get the height of the second matrix, it just returns the height of the first one. This is not very useful, since I am writing a short game where you fly through a cave, like in caverunner, and can't do collision with the ceiling.

Once I was but the learner,
now, I am the Master.

Login to post a reply

Server time is: 2024-11-24 04:45:28
Your offset time is: 2024-11-24 04:45:28