Hey everyone,
It's me again.
^ 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!
Hardon Collider:high velocity colliders going through walls
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
-
- Prole
- Posts: 34
- Joined: Mon Nov 24, 2014 9:15 pm
Hardon Collider:high velocity colliders going through walls
- Attachments
-
- Yeah.love
- (467.57 KiB) Downloaded 160 times
Re: Hardon Collider:high velocity colliders going through wa
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
lf = love.filesystem
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
-
- Prole
- Posts: 34
- Joined: Mon Nov 24, 2014 9:15 pm
Re: Hardon Collider:high velocity colliders going through wa
Are you saying to get the update function from the lib, then call it twice?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
-
- Prole
- Posts: 34
- Joined: Mon Nov 24, 2014 9:15 pm
Re: Hardon Collider:high velocity colliders going through wa
^ Didn't work if that's what you meant.Ethan-Taylor wrote: Are you saying to get the update function from the lib, then call it twice?
It stuffed it up more.
Re: Hardon Collider:high velocity colliders going through wa
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
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
-
- Prole
- Posts: 34
- Joined: Mon Nov 24, 2014 9:15 pm
Re: Hardon Collider:high velocity colliders going through wa
I'm real new to all this stuff, can you please describe how to do the 1st solution?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
btw I'm not keen on using box2D XD
Re: Hardon Collider:high velocity colliders going through wa
Yo!
Your box is made out of 4 harddon collision rektangels. Increase the width (or hight) of them would fix the problem
Your box is made out of 4 harddon collision rektangels. Increase the width (or hight) of them would fix the problem
Who is online
Users browsing this forum: Bing [Bot], Google [Bot] and 9 guests