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.

DarkBASIC Professional Discussion / Camera stuck in the ground?

Author
Message
medsouz
16
Years of Service
User Offline
Joined: 10th May 2010
Location:
Posted: 13th May 2010 01:37
My code is



I am just testing elements I could use to make an RPG game but my make-shift gravity gets the camera stuck in the ground so it cannot move... I'm too cheap to buy DarkPhysics so I made my own gravity.
hpfan273
19
Years of Service
User Offline
Joined: 19th Jan 2007
Location:
Posted: 13th May 2010 03:20
don't let the camera have the gravity... ?

Why do they turn against me? Especially when i need them the most?
Mobiius
Valued Member
23
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 13th May 2010 10:51
Doesn't automatic camera collision only work with static objects or BSP files? (Of which your not using?)

You should only apply gravity if there is no collision between the top of any object (in this case, the ground) and the bottom of the camera. You don't do this.

You should look at the intersect object command, you can use this for collision detection.

My signature is NOT a moderator plaything! Stop changing it!
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 13th May 2010 13:27
The camera isn't stuck on the ground. What makes you think it is?

It's stuck a short distance above the ground which is what you should expect from the automatic collision function according to the help file. What isn't clear to me is why it gets stuck at the particular distance of 5.45 units (see code snippet at end). Perhaps it's something to do with the default collision objects that DBPro uses behind the scenes?

Login to post a reply

Server time is: 2026-07-27 20:18:20
Your offset time is: 2026-07-27 20:18:20