[r199] asm.js Collision mask of circle object is too big

0 favourites
  • 3 posts
From the Asset Store
This is a single chapter from the "Construct Starter Kit Collection". It is the Student Workbook for its Workshop.
  • Problem Description

    If with asm.js you set the object's property "Collision Mask" to "Circle", "Is Overlapping" or "On Collision" conditions are not triggering because this collision mask is bigger than object's bounding box, so if i set object's collision polygons (in image editor) to bounding box (or i can set anything else), it is impossible for that object to collide with other objects with that polygons, because they just cannot reach other objects with that collision mask. In box2d this mask is little less than in asm.js and at least while the ball is rolling, the Is Overlapping always triggers.

    Attach a Capx

    [attachment=0:14j1x9gn][/attachment:14j1x9gn]

    Description of Capx

    A layout with a ball object and ground object with physics (asm.js), event sheet with events - If ball is overlapping ground set text to yeah, else set text to nope, and Is in touch event that applies little torque to ball. So if you touch or hold mouse buttons in preview the ball will roll.

    Steps to Reproduce Bug

    • Open project, start preview, let the ball hit the ground.
    • Notice that Is Overlapping condition is not triggering
    • Touch the layout or hold mouse buttons, the ball will roll, see, Is Overlapping is triggering as it starts to roll, but sometimes for a half of second it is not triggering while the ball rolling, i guess this is because when ball's angle = 0 or 90 or 180 or 270 its bounding box cannot reach the ground to overlap it.

    Observed Result

    Is Overlapping or On collision conditions are not triggering, when they should because collision mask is bigger than object's bounding box.

    Expected Result

    If circle object is on the ground, Is Overlapping triggers.

    Affected Browsers

    • Chrome: (YES)
    • FireFox: (YES)
    • Internet Explorer: (YES)

    Operating System and Service Pack

    Windows 7, 8.1 64bit latest drivers.

    Construct 2 Version ID

    r199

  • Hm, now i think that it's probably by design, well anyway i'll leave this report here for your decision Ashley, and i'm sorry if it's not a bug.

    And i reuploaded a .capx

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Closing as by design: like the other behaviors, the Physics behavior handles collisions and moves objects so that they are no longer overlapping, before the "Is overlapping" condition is tested.

    However "On collision" still triggers. You can test this by changing the text object when "On collision" triggers instead.

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