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 / object collision problem

Author
Message
smerf
19
Years of Service
User Offline
Joined: 24th Feb 2005
Location: nm usa
Posted: 20th Aug 2017 09:07
using dbpro.

i have an object with many limbs and a sphere as a stand in player. The level i made has different height floors but the player will not drop to lower levels but if i walk off the map the player will fall. tried to delete object collision boxes and tried using object hit which did nothing.

A child's dream never dies.





Attachments

Login to view attachments
LBFN
17
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 21st Aug 2017 22:39
I made up a quick level similar to part of yours to try and see what is going on, although I simply modeled a level instead of adding boxes as limbs. I used your program and it did basically what you are saying. The sphere object drops to the main level but will not drop down to lower levels and it does fall off the edge. I tried manually adding a collision box to object 2, but it did not make any difference.

To be candid, I have used DBP's native collision very little and use Sparky's collision https://forum.thegamecreators.com/thread/74762 It takes a little getting used to, but with the example given you should be able to figure it out. Additionally, there are a lot of threads here about it. I do not know if it is possible to setup a 'complex' object in native DBP collision; if not, that would be the issue. You can easily do that with Sparky's collision.

I cannot help but think with all the limbs needing to be checked every time that it would be more efficient to model this world.



So many games to code.....so little time.
Scorpyo
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: italy
Posted: 22nd Aug 2017 08:02
Not really solutions but few comments/suggestions:

Did you track the collision value to see what it does in real time?

put this in the do-loop and see what it does when moving around



probably it stays at 1 till you cross the map edges

another test trial would be to manually position the sphere at different heights by binding the y positioning to a key press and see if the collision value changes at a certain height.

Also, it could be that your objects y size is too small for native collision to properly work . try to scale up everything by 10

Just a few ideas though
Cheers
smerf
19
Years of Service
User Offline
Joined: 24th Feb 2005
Location: nm usa
Posted: 23rd Aug 2017 08:36
yeah i figured it might be a dbp collision problem ive used sparkys before been a long time though. thanks for the help guys.
A child's dream never dies.





Login to post a reply

Server time is: 2024-04-23 13:46:49
Your offset time is: 2024-04-23 13:46:49