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 / walking on top of an object

Author
Message
mnemonic
17
Years of Service
User Offline
Joined: 14th Jan 2007
Location: Sweden
Posted: 17th Dec 2010 11:05
Hi!

I have used automatic camera collison to detect when the camera collides with the cube object. With the response flag set to sliding collision, I'm satisfied with the results when colliding with the cube from the sides.

Now to my problem:

As you can see in the code I have added the camera(player) the abilility to hover over the ground when pressing the space key. While the space key is pressed I still can control the camera with the arrowkeys and drop down on top of the cube. Here comes the problem,,, Since a collision is detected when I drop down onto the box the camera gets stuck. But I want the player to be able to walk ontop of the cube instead of getting stuck.

Do I have to write my own collision routine or is there some built in commands i can use?

The Zoq2
14
Years of Service
User Offline
Joined: 4th Nov 2009
Location: Linköping, Sweden
Posted: 17th Dec 2010 20:39
Maybe you could add a cube under the camera and check for collision with the block

Srry about my english im from sweeden
Hodgey
14
Years of Service
User Offline
Joined: 10th Oct 2009
Location: Australia
Posted: 18th Dec 2010 10:30
Hi, sliding collison might be what you're after. Check out TDK's tutorials for collision.

http://forum.thegamecreators.com/?m=forum_view&t=96045&b=10

Hope this helps

A clever person solves a problem, a wise person avoids it - Albert Einstein
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 20th Dec 2010 14:36
Or if you want to use a simple and free collision plugin try sparky's. Tutorials and links can be found here:
http://forum.thegamecreators.com/?m=forum_view&t=95770&b=7

The native commands are OK but sparky's is fast and accurate.

Login to post a reply

Server time is: 2024-09-29 00:22:13
Your offset time is: 2024-09-29 00:22:13