Page 1 of 1

A better, more accurate collision?

PostPosted: Mon Dec 31, 2012 7:48 am
by Hblade
I'm looking for a way to have collision without using physical response. Is this possible?

Re: A better, more accurate collision?

PostPosted: Mon Dec 31, 2012 8:22 am
by skydereign
Why? PhysicalResponse is by far the easiest way to handle collisions, and it is pretty accurate. The major problem with setting up collisions, is that you need to know the shape of the surface you are colliding against, which takes a lot of pixel counting and similar. There are a lot of things you can simplify in the process, depending on your game. For instance, if you aren't trying to accurately bounce things off of each other, like landing on the ground, the problem becomes easier.

Re: A better, more accurate collision?

PostPosted: Mon Dec 31, 2012 8:49 am
by Hblade
The problem i'm running into now with physical response is my character gets stuck on the wall (only sometimes) even using the double yvel, physical response, then yvelocity = yvel. He seems to only be "sticking" to the wall when he's falling.

I'll just do everything from scratch again. It's not that big a deal really since it shouldn't be too hard to debug. I think I just came up with a way to do that

Re: A better, more accurate collision?

PostPosted: Fri Jan 18, 2013 5:15 pm
by monsterbrain
Hblade wrote:The problem i'm running into now with physical response is my character gets stuck on the wall (only sometimes) even using the double yvel, physical response, then yvelocity = yvel. He seems to only be "sticking" to the wall when he's falling.

I'll just do everything from scratch again. It's not that big a deal really since it shouldn't be too hard to debug. I think I just came up with a way to do that


Same thing happened to me too .. I did the platformer tests based on the Proper Method Tutorial in Game Tutorials (which contains some mistakes) & Got stuck when at the edges when using physical response .. If i change the value greater than 0, it will bounce off too far ... So i removed it, & just subtracted the speed from x when Collision occurs on left & vice versa (Still a jerking occurs ) ..How did you rectify that ?

Re: A better, more accurate collision?

PostPosted: Fri Jan 18, 2013 10:24 pm
by Hblade
I haven't, its weird if you use tiles (even though the tiles are perfectly aligned to look like 1 big wall) your likely to have this bug

Re: A better, more accurate collision?

PostPosted: Sat Jan 19, 2013 9:39 am
by monsterbrain
Hblade wrote:I haven't, its weird if you use tiles (even though the tiles are perfectly aligned to look like 1 big wall) your likely to have this bug


Thanks a lot ... I've been encountering problems due to using 'Tiles' .. Now i'm using Tiles for BG Images & Filled Regions for Collision Tests...

Re: A better, more accurate collision?

PostPosted: Sun Jan 20, 2013 6:47 am
by Hblade
no prob

Re: A better, more accurate collision?

PostPosted: Thu Feb 06, 2014 9:00 pm
by Hammerit
I could write collision without using physicalresponse. If you still need it pm me, but i would probably do this anyway to show how it's done.