Hi, is there a way to trigger on a collision exit ...
# korge
l
Hi, is there a way to trigger on a collision exit rather than on a collision enter (sprite.onCollision) ? I can use hitTest inside an updater to do it manually but I cannot use shapes with this method. (I want to detect when a player is falling down a platform for example.) Thanks for you help ๐Ÿ™
m
Hi @Lazard I couldn't find such method but you can create your own extension function similar to onCollision (which is itself an extension function) https://github.com/korlibs/korge/blob/a20ce6dfd7fd71088c56ce6db9ee987ea5e57683/kor[โ€ฆ]ge/src/commonMain/kotlin/com/soywiz/korge/view/ViewCollision.kt
d
And if you find it useful and reusable, please, feel free to make a PR adding it! :)
๐Ÿ‘ 2
l
Thank you ! I'll try it and maybe make a PR you're right ๐Ÿ˜‰
๐Ÿ‘ 2
https://github.com/korlibs/korge/pull/312 It's my first ever open source PR, I hope I did it correctly ๐Ÿ˜Š
๐Ÿ™ 1
๐Ÿ‘ 1