Closed IkonOne closed 7 years ago
Ah, thanks very much. :+1:
It's obvious here that I'm biased towards using .touching
to mean literally touching (just separated from collision or next to something, so the same as wasTouching
), rather than just overlapping.
I must have assumed at the time that touching.none
was dynamic, but of course touching
is just a simple object full of booleans, and I had totally forgot about wasTouching
.
My pleasure!
On Wed, Aug 24, 2016 at 4:23 AM, Chris Andrew notifications@github.com wrote:
Merged #19 https://github.com/hexus/phaser-arcade-slopes/pull/19.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/hexus/phaser-arcade-slopes/pull/19#event-765706225, or mute the thread https://github.com/notifications/unsubscribe-auth/ABDe7vN1aqZFkXz6-NZ01n2kqePbcrVHks5qjA2ngaJpZM4JrSE- .
Turns out setting the wasTouching flags on collision is incorrect, as this is already handled by the body's preUpdate()
method.
So, setting them here is just ensuring that they'll always be false, because the body's preUpdate()
sets all touching flags to false.
Not all flags were being updated in the Body class.