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 / Problems with my Code : Collision gone wrong

Author
Message
Fneep
19
Years of Service
User Offline
Joined: 3rd Sep 2005
Location: In my house
Posted: 16th Jul 2006 13:41 Edited at: 16th Jul 2006 13:44
Hi, Ive been working on some jumping and collision code in DBPro with some simple cone and cube objects. Its not finished (Havent put in any collision on the z axis nor is there a limit on how far you can jump upwards) but I have come across a problem i am unable to solve.
Here it is:

As you can see, the collision of the cube is all wrong. It is colliding in the object, not on as it should.
Anyway, here is my code:


Also, there is no doubt in my mind that my code is unnecessarily complicated. If anybody were to clean up my code or replace a few redundant commands, that would be great.

Thanx in advance:

~BlackEthereal

When life gives you lemons, make orange juice. Then sit back, drink the orange juice, and wonder how the f**k you made orange juice out of lemons.
flock
18
Years of Service
User Offline
Joined: 10th Mar 2006
Location: Earth
Posted: 16th Jul 2006 13:48
Oh, DBPro...

a.k.a. "flockhound"
Fneep
19
Years of Service
User Offline
Joined: 3rd Sep 2005
Location: In my house
Posted: 23rd Jul 2006 12:15
bump

When life gives you lemons, make orange juice. Then sit back, drink the orange juice, and wonder how the f**k you made orange juice out of lemons.
Daemon
18
Years of Service
User Offline
Joined: 16th Dec 2005
Location: Everywhere
Posted: 23rd Jul 2006 18:08 Edited at: 23rd Jul 2006 18:08
There are better ways of doing collision like sparky's dll or nuclear glory collision.

However, if this is all you want then I can tell you that it was detecting collision one loop too late, so I added a hidden box 1 size bigger than box 2 and detected for collision with that instead.



Sixty Squares
18
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 25th Jul 2006 14:10
This may not be what you wanted, but you could try this:


I just added MAKE OBJECT COLLISION BOX to it. I gave the cone 1 extra unit of collision space on all sides.

Fneep
19
Years of Service
User Offline
Joined: 3rd Sep 2005
Location: In my house
Posted: 31st Jul 2006 22:19
Thanx

When life gives you lemons, make orange juice. Then sit back, drink the orange juice, and wonder how the f**k you made orange juice out of lemons.

Login to post a reply

Server time is: 2024-11-26 14:28:27
Your offset time is: 2024-11-26 14:28:27