Well, it is working now. The issue was: Game Maker's built in bounding box variables (bbox_top, bbox_bottom, bbox_right, bbox_left) returns integer values, causing serious issues. Now, I use the y coordinate, sprite height and y-offset for the same, but returns decimal value. Same for x-axis, though it was working fine. Now it returns grounded value perfectly, it's responsive and reliable... At least after long time testing, it works fine.
Next task is: slopes
Slopes are tricky, but I have a few variables and data to use for it. I want to take the middle collision point for the check for grounded and stop the character movement. But I need to check for the x position within the tile. Because the slope collision still uses square hit detection. So just get the x, adjust the y based on it and we're done. Easy to say!
Get GM:S Tile Collision Test Engine (early WIP)
Leave a comment
Log in with your itch.io account to leave a comment.