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 / Sparkys collision problem - again.

Author
Message
Gunslinger
19
Years of Service
User Offline
Joined: 29th May 2007
Location:
Posted: 14th Feb 2012 02:32 Edited at: 14th Feb 2012 03:04
Hello,
i got some problems with sparkys collision.
I can't get a "clean" collision.
Well, side collision is working "okay". (Not good - but okay)

My problem is i want the objects on the floor. But i can't get it to work. It's driving me crazy, seriously.
Normaly i wouldn't ask for such a favor, but could someone fix my code and add that y stuff?
A special thanks for that person somewhere in the game would be sure...

Well here's a small video to show my problems: (Watch in 1080p to see everything clear)
http://youtu.be/OL1zTVbnp8Q?hd=1

my code to setup the enemy:


enemy move code:


Enemy(i).Height# is the Height you see at the debug info, same for Radius.

my code to setup the player:



my code to move the player:


It's mostly taken from the sliding demo.

Hope somebody can help me
Best regards.

e/ Player Jump is not needed, doesn't work anyway :x
Ramon156
14
Years of Service
User Offline
Joined: 13th Jul 2011
Location: Netherlands
Posted: 10th Mar 2012 08:09 Edited at: 10th Mar 2012 08:10
Hi Gunslinger!

I have problems with jumping also when I set the code in a Function instead of a Gosub! And why this is, I have no idea??

Jumping works good like this :



But when doing it like this :



I can only jump a third lower.


The only thing I can think of in your case, is that your collision Sphere for the player, is placed at the bottem of the box.
Wich means if the sphere radius is 10
It will go "up" for 5 into the player.
And it will go "down" for 5 under the player.
like this :

[img][/img]

Login to post a reply

Server time is: 2026-07-09 00:08:44
Your offset time is: 2026-07-09 00:08:44