In-Game: Non-solid Instance colliding with a solid resets the non-solid before and again after its Collision Event #5687
Labels
documentation
Improvements or additions to documentation are required by this issue
gmrt
project
This issue has a sample project attached
runner-bug
In-game bugs with the "GameMaker Studio 2" runtimes
Milestone
Description
The full narrative:
https://forum.gamemaker.io/index.php?threads/trying-to-better-understand-move_contact_solid-in-different-events.111517/
As briefly summarized as I can while keeping the main content:
The Collision Event is documented as such: if a moving non-
solid
collides with a stationarysolid
, the non-solid
will be reset to its previous coordinates and then the Collision Event code will execute. (I'm not dealing with other combinations of non/solid
in these tests or this report.) The order of when Collision triggers is only important here in the context of testing what happens after the Collision Event ends, and thus I'll bring to attention that currently undocumented moment: GM moves instances, then Collision triggers, then End Step triggers.My GMC post (10th in the thread linked above) declares all the necessary setup from my included demo. (There's also some other pre-written tests in the Collision Event that I've commented out which you can use if you find helpful.)
Expected behavior: A collision gets detected. GM resets the non-
solid
instance to its previous coordinates. The Collision Event code executes. All is well.Unexpected actual behavior: A collision gets detected. GM resets the non-
solid
instance to its previous coordinates. The Collision Event code executes. GM again resets the non-solid
instance to its previous coordinates!Steps To Reproduce
Test on Windows and GX.games for sure. I started to test on Android but didn't want to complicate the project with virtual keys; be my guest (for any/all other runners) once you're satisfied with this test as-is. I could describe what happens differently on HTML5, but first, we'd have to talk about parallel universes.
Using the demo project:
solid
right square.exit
lines ino_hero
's Collision and End Step.When the End Step is allowed to handle the collision, the "onscreen" outcome is smooth, and the debug messages deliver expected results. When the Collision Event is instead allowed to handle the collision, the "onscreen" outcome has the infamous GameMaker
solid
stutter-gap, and the debug messages prove the non-solid
instance is reset both before and after the Collision Event.Which version of GameMaker are you reporting this issue for?
IDE v2024.2.0.132 Runtime v2024.2.0.163
Which operating system(s) are you seeing the problem on?
Windows 10.0.19045.0
69fba261-221e-419f-87bf-d9a8a0692d06
The text was updated successfully, but these errors were encountered: