SOLVED place_meeting collision detection flip-flopping between true and false, with the same value

STANN.co

Member
I'm working on a little top-down RPG kinda game. And am making a path-finding system for npc's.
Cutting the fluff, i'm having trouble with some collision detection. I was debugging for several hours until i narrowed my problem down to this.
1584979326057.png1584979335671.png
What you're looking at here. Is a path generated with mp_grid_path. (that's the green line) And then i'm trying to simplify that path, by iterating over each point to see if it can be shortened.
And i found a problem when using the place_meeting function here. Check the 2 screenshots. And look in the watch window. Left picture collision_detected is true. right picture collision_detected is false. But place_meeting get's the EXACT same input in both pictures. the pathX and pathY values are the same. Somehow changing the length of the green path, makes it flip-flop between true or false. I thought it might be a GMS2 bug. But i was suggested to share here before reporting further.

Appreciate any and all help
 
Top