Collision events not raised without overlapping sprites?

0 favourites
  • 7 posts
From the Asset Store
2D fighting template based in the game that defined the fighting games genre.
  • Hi everyone,

    I've got two sprites. Both of them are simply created through the fill color in C3 and their collision shape is set to bounding box.

    I have an event sheet that handles collision and I made sure it is included in the main one.

    The first sprite has a MoveTo behavior with stop on solid true. The second sprite has a solid behavior with a tag. There is NO event to exclude or include the tag as that setup isn't used for anything just yet.

    Collisions on both objects are enabled even on runtime (checked with Debug mode).

    I setup my event as such:

    - Sprite1 OnCollisionWith Sprite2 > DebugText Append "Collision!"

    Now when I run the layout Sprite1 moves towards the target I set to it. It encounters Sprite2 and stops. So far so good, the problem is the text box doesn't change and remains empty. I can see Sprite1 stuck to Sprite2. I can see it stopped moving, yet the collision event doesn't run, any idea why?

    I tried to change this to Overlapping instead of collision and it didn't work still.

    Tagged:

  • Is your text box large enough to contain the word? If the word doesn't fit, it doesn't get displayed at all instead of being cropped.

  • Is your text box large enough to contain the word? If the word doesn't fit, it doesn't get displayed at all instead of being cropped.

    Yes, it is 6x the size of the word.

  • It looks like the moveto behavior's stop on solids property doesn't actually let the objects collide or overlap, it stops before they touch at all.

    You can use the stop moveto action on collision to stop instead of the stop on solids property if you want collision based events to fire.

  • It looks like the moveto behavior's stop on solids property doesn't actually let the objects collide or overlap, it stops before they touch at all.

    You can use the stop moveto action on collision to stop instead of the stop on solids property if you want collision based events to fire.

    Just tried this out and you're right, thank you very much. This makes the documentation misleading -- super misleading because it says the opposite:

    Stop on solids

    If enabled, movement will stop if the object collides with something with the Solid behavior, and trigger On hit solid. If disabled solids are ignored.

    Someone needs to fix the documentation and makes sure quirks like that are mentioned in the tooltips.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Just tried this out and you're right, thank you very much. This makes the documentation misleading -- super misleading because it says the opposite:

    Stop on solids

    If enabled, movement will stop if the object collides with something with the Solid behavior, and trigger On hit solid. If disabled solids are ignored.

    Someone needs to fix the documentation and makes sure quirks like that are mentioned in the tooltips.

    I think you may be using by mistake the:

    Sprite "On Collision with another object"

    instead of:

    MoveTo "On Hit Solid"

  • I think you may be using by mistake the:

    Sprite "On Collision with another object"

    instead of:

    MoveTo "On Hit Solid"

    Oh, I see. Now I realize what this means. I completely misunderstood the documentation. Thanks for clarifying.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)