YoYoGames / GameMaker-Bugs

Public tracking for GameMaker bugs
11 stars 4 forks source link

I updated 2024.4 and the behavior of collision_point changed. #5762

Closed gm-bug-reporter[bot] closed 1 week ago

gm-bug-reporter[bot] commented 1 week ago

Description

When Compatibility Mode is off, Prior to 2024.4, the collision_point function would not hit when pointing to the top-right, bottom-right, or bottom-left coordinates of a box.

Specifically, when the box coordinates were 0,0 and the width and height were 16,16, the behavior was as follows

point1(0,0) => hit point2(0,16)=>no hit point3(16,16)=>no hit point4(16,0)=>no hit

The latest version, 2024.4, works as follows

point1(0,0) => hit point2(0,16)=>hit point3(16,16)=>hit point4(16,0)=>hit

Steps To Reproduce

・Place a square object with a width and height of 16 at coordinates 0,0. ・Check the 4 corner points of the rectangle from the test object to that object with collision_point. ・Compare with 2024.4 and the previous version.

Which version of GameMaker are you reporting this issue for?

IDE v2024.4.0.137 Runtime v2024.4.0.168

Which operating system(s) are you seeing the problem on?

Windows 10.0.19045.0

Which platform(s) are you seeing the problem on?

Windows

81b08043-6535-45d5-a7a4-01de8f7afc27

jackerley commented 1 week ago

Hi, in 2024.4 changes were made to make collision_point, collision_line and collision_rectangle more consistent with how sprite collisions work. They now respect exactly the same rules for collisions as a sprite collision with the exception that collision_point and collision_line do not have to cover a pixel center ( as this would rarely happen )