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 / Ground Collision

Author
Message
bergice
17
Years of Service
User Offline
Joined: 5th Jun 2007
Location: Oslo,Norway
Posted: 17th Jun 2007 23:14
I am making a game where i can move free up and down, left and right on the matrix, but i dont know how to make the camera stop when i hit the ground, it is hills and stuff too...

bla bla bla...
TDK
Retired Moderator
22
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 18th Jun 2007 09:33
Look up the command Get Ground Height in the help files - that's what is used to tell you the height of the matrix at the camera's X and Z position so you can reposition it at the required height.

TDK_Man

bergice
17
Years of Service
User Offline
Joined: 5th Jun 2007
Location: Oslo,Norway
Posted: 18th Jun 2007 15:44
i tried but it says variable float is an unknown command... Can u give me the excact code for doing it?

bla bla bla...
Scorpyo
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: italy
Posted: 18th Jun 2007 22:39
bergice
17
Years of Service
User Offline
Joined: 5th Jun 2007
Location: Oslo,Norway
Posted: 19th Jun 2007 15:04
thanks, but what i ment is that you can move freely around in the air too

bla bla bla...
Scorpyo
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: italy
Posted: 19th Jun 2007 23:18
bergice
17
Years of Service
User Offline
Joined: 5th Jun 2007
Location: Oslo,Norway
Posted: 20th Jun 2007 16:08
thanks

bla bla bla...
Brain111
17
Years of Service
User Offline
Joined: 5th Feb 2007
Location: In my own little world.
Posted: 29th Jun 2007 07:44
I changed the code just a little to make it so you can continue to float off the ground if it drops down, rather than staying the same height from the ground. I'm not sure which of the two you were going for.

The code now uses cy# for the camera's height (since that's what it is now instead of the distance you are floating from the ground). Also the new minground# value that I added is the minimum distance that the camera must stay from the ground. Also, I indented some stuff to make it a little easier to read.



Oh, and I bumped up the max speed value. Yay speed.

Anarchy Burger - hold the Government!

Login to post a reply

Server time is: 2024-11-25 15:32:12
Your offset time is: 2024-11-25 15:32:12