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 / how to turn gravity off?

Author
Message
game master 07
17
Years of Service
User Offline
Joined: 26th Feb 2007
Location: Maryland
Posted: 31st Mar 2007 01:16
I have a code that I made with an fps camera and a matrix terrain. The
camera is set at ground level.What i want to do is instead of it being
locked in ground level is to be able to fly around the map with the camera. Is this a gravity problem or a control problem that i need to change in order to do this? Also could someone mabey post a change to my code that makes it so I can do this? Here is my code



gm07
Clackersmith
21
Years of Service
User Offline
Joined: 4th Sep 2003
Location:
Posted: 31st Mar 2007 03:19 Edited at: 31st Mar 2007 03:25
As stated in the rem remark "rem Position camera to the ground height"



That’s the section that is binding you camera to the ground simply remove it.

The inadequacies of human cognitive ability are cause for the imperfection of reality.
game master 07
17
Years of Service
User Offline
Joined: 26th Feb 2007
Location: Maryland
Posted: 31st Mar 2007 03:38 Edited at: 31st Mar 2007 03:38
Oh thanks! I didn't release it was that simple. BTW how I made that code was from pieces of other codes and tutorials. I Was following the
steps and the tutorial for an fps game that only had it were the camera was
on the ground. That is why I put the camera to the ground height! One more thing though How do you load height maps for terrains? Do you apply it to the matrix or does dpp automatically make a new terrain ground mesh with the height map applied?

gm07
Clackersmith
21
Years of Service
User Offline
Joined: 4th Sep 2003
Location:
Posted: 31st Mar 2007 03:52 Edited at: 31st Mar 2007 04:08
There are a lot of code snippets out there that load in a grayscale height map and "apply" it to a matrix, so a quick search of the forums or codebase should get something along the lines of what you are looking for.

Whenever I am using terrain in a project I create it externally with the use of a few programs I have picked up over the years, so creating terrain solely with DB is not really my department.

To my knowledge Advanced terrain is the only set of commands that DBPro has to easily load and apply a height map to terrain.

Edit: Here are two links to a few code snippets in the code base.

http://darkbasic.thegamecreators.com/?m=codebase_view&i=11906e72617ea1a56628066eaedec296
http://darkbasic.thegamecreators.com/?m=codebase_view&i=cc8675fd8e2fd3b0b6d404ec4e82e7ef

The inadequacies of human cognitive ability are cause for the imperfection of reality.
game master 07
17
Years of Service
User Offline
Joined: 26th Feb 2007
Location: Maryland
Posted: 31st Mar 2007 04:05
Thanks. I must have missed those when I was searching.

gm07

Login to post a reply

Server time is: 2024-11-25 22:36:25
Your offset time is: 2024-11-25 22:36:25