View Issue Details

IDProjectCategoryView StatusLast Update
0025174DocumentationManual ContentPublic2018-06-29 16:44
ReporterzenAssigned ToMark Alexander 
PriorityVery HighSeverityB - MajorReproducibility100%
Status ClosedResolutionFixed 
PlatformWindowsOS OS Version
Product Version 
Target VersionFixed in Version 
Summary0025174: Manual Content: [GMS2] Bounding box is wrongly used as preliminary check to precise collisions
DescriptionUpdate from Alex:
I've discovered that this was actually a runner bug and after going over it with Mike R and recreating the issue in 1.x (and attaching a 1.x sample project) I can confirm that IDE behavior is consistent between GMS2 and GMS1 and that the runner seemingly uses the bounding box information as a preliminary check to the precise check - causing this bug.

Old from zendesk:
A Manual collision mask can be set previously to setting a "Precise" or "Precise per frame" collision mask, and the collision event fires using whatever was set in the Manual collision mask instead of the Automatic collision mask.

Precise collisions should always be Automatic (or if not, at least display the Manual collision mask in the sprite editor if it is selected).
Additional InformationOriginal helpdesk ticket: http://help.yoyogames.com/tickets/118310
TagsNo tags attached.

Activities

Stewart Bishop

2017-01-11 10:26

Developer  

CollisionMask.yyz (20,930 bytes)

Stewart Bishop

2017-01-11 10:31

Developer   ~0050956

Import the attached project
Run the project
Move the square using WASD to move the blue square
Move till you should be colliding with any of the shapes
See that you don't collide with any on the left side
Move to the right side and see that this now shows a collision

If you do get a collision on all the shapes then the project got fixed on export and you need to break it again, this can be done by changing the collision mask to manual rectangle, moving it to somewhere and then changing to precise/precise per frame and then changing to automatic then repeat the above steps.

Alexander Borup

2017-01-17 10:37

Developer  

CollisionMask1x.gmz (35,561 bytes)

Alexander Borup

2017-01-17 10:39

Developer   ~0051106

I've discovered that this was actually a runner bug and after going over it with Mike R and recreating the issue in 1.x (and attaching a 1.x sample project) I can confirm that IDE behavior is consistent between GMS2 and GMS1 and that the runner seemingly uses the bounding box information as a preliminary check to the precise check - causing this bug.

Mike Rennie

2017-01-20 12:09

Developer   ~0051246

Fixed by forcing automatic bounding box generation in the asset compiler when precise collisions are enabled.

Ross Manthorp

2017-03-17 10:44

Adminstrator   ~0052252

Verified. Closing.

Steven Campbell

2018-02-16 14:09

Manager   ~0057769

Reopening as this has reared it's head again in the form of 0028376
Going to remove the code this put in, and create a new bug to have the IDE be clearer as to what's going on.

We think this originally came about because you could setup a manual bounding box to not cover any part of the sprite, switch on Precise detection, and have no collision because it's clamped to the bounding box.
Alex suggests turning the bounding box red if no pixels from the sprite are within the bounding box when Precise is selected.

Steven Campbell

2018-02-16 14:32

Manager   ~0057771

Assigning to Mark to document this...
The manual currently states:
Precise: This creates a precise collision mask based on the outline of the sprite. If the sprite has multiple sub-images, then this will be a composite of the edges of all the sub-images placed over each other. This is very slow and generates a lot of CPU overhead.

Precise (per frame): This creates a precise collision mask on a per-frame basis (ie: the mask will change to conform to the outline of each different frame). This is by far the slowest type of collision mask to resolve and should be avoided except in very, very specific and infrequent cases.

The changes I've just done make this invalid in that you can now select a bounding box area that will clamp the precise check to. See attached image where by the squares will have precise collision checking, but the circle will not.

In the case of per frame, the bounding box will be static for each frame, so should be set to encompass all pixels through all frames that should be checked.

preciseboundingbox.png (50,301 bytes)
preciseboundingbox.png (50,301 bytes)

Mark Alexander

2018-02-22 11:23

Developer   ~0057849

Docs updated to reflect this.