Page 1 of 1

Hardon Collider:high velocity colliders going through walls

Posted: Fri Jul 10, 2015 8:07 am
by Ethan-Taylor
Hey everyone,
It's me again.

Image

^ this is a photo of the problem.

As you can see, the bullets that are fired from the player are super fast, and sometimes they go through walls because of this. (I think)
I've tried everything.
Killing the velocity, using the seperating vector, and probably alot more tinkering with stuff.
The collision seems to work flawlessly if I degrade the speed of the bullets. But I obviously want them flying at high speeds!

I've attached a .love file, excuse the visual enhancements and not using OOP. btw the light vs shadow engine is supa awesome!

Thanks, Ettthhaaannn!

Re: Hardon Collider:high velocity colliders going through wa

Posted: Fri Jul 10, 2015 9:57 am
by Nixola
I think Hardon Collider has some setting to prevent bullet passing through, but if you can't find anything you could split its update function, simply calling it twice in a row with dt/2 as parameter

Re: Hardon Collider:high velocity colliders going through wa

Posted: Fri Jul 10, 2015 10:05 am
by Ethan-Taylor
Nixola wrote:I think Hardon Collider has some setting to prevent bullet passing through, but if you can't find anything you could split its update function, simply calling it twice in a row with dt/2 as parameter
Are you saying to get the update function from the lib, then call it twice?

Re: Hardon Collider:high velocity colliders going through wa

Posted: Fri Jul 10, 2015 10:14 am
by Ethan-Taylor
Ethan-Taylor wrote: Are you saying to get the update function from the lib, then call it twice?
^ Didn't work if that's what you meant.
It stuffed it up more.

Re: Hardon Collider:high velocity colliders going through wa

Posted: Fri Jul 10, 2015 6:36 pm
by ivan
To prevent tunneling you can:
1.use a fixed time step with accumulators. the most sensible solution if you know the max velocity of bodies
2.use ray-casting to simulate very fast moving objects
3.use a continuous collision library like box2d

Re: Hardon Collider:high velocity colliders going through wa

Posted: Fri Jul 10, 2015 11:22 pm
by Ethan-Taylor
ivan wrote:To prevent tunneling you can:
1.use a fixed time step with accumulators. the most sensible solution if you know the max velocity of bodies
2.use ray-casting to simulate very fast moving objects
3.use a continuous collision library like box2d
I'm real new to all this stuff, can you please describe how to do the 1st solution?

btw I'm not keen on using box2D XD

Re: Hardon Collider:high velocity colliders going through wa

Posted: Sun Jul 12, 2015 10:28 am
by Zeliarden
Yo!
Your box is made out of 4 harddon collision rektangels. Increase the width (or hight) of them would fix the problem