Replies: 2 comments 12 replies
-
@ewal I was thinking something similar as a solution! I bet you might have more robust results if you used raycasting from the actor to the platform, then deciding it's collision type (or perhaps collision group?). For example if the actor is above the platform, a downward ray could detect that and make the platform collision fixed, but if the platform is above the downward ray would not be intersecting the platform and could be passive? The latest alpha has arbitrary raycasting against a scene built in that might make this a bit easier to code (non-alpha you'll need keep a reference to all the colliders you intend to raycast against) #2410 I'll have some time later to try working out a sample 👍 |
Beta Was this translation helpful? Give feedback.
-
@eonarheim, I'm starting to suspect that my problem is related to collision handling in the Tiled map. I stripped down a project to it's bare essentials in my hunt to locate the issue but I still experience it. The project is found here https://github.com/ewal/collision-demo if you would like to take a look. I added instructions in the Readme on how to recreate the collision issue. |
Beta Was this translation helpful? Give feedback.
-
Hi, I'm trying to find a good strategy on how to resolve one-way collisions within a Tiled object layer.
I have a solution working but every now and then the collision check fails and the main actor is allowed to pass through the colliding object actor.
Each object has a
Fixed
CollisionType
by default on which I toggle thecollisionType
depending on the colliding side.The event listeners is hooked up in the
Scene
s onInitialize hook. Example below...As stated, this works most of the times, but, if I stress the collider with enough events the actor will eventually fall through.
I'm trying to debug the problem but I'm rather suspecting that my strategy is faulty...
Any ideas? :)
Beta Was this translation helpful? Give feedback.
All reactions