Y
Yelf
Guest
The issue can be seen in this video: LINK
(Also if you have better ways to link videos please tell me)
I have code that makes the instance_nearest platform visible.
Essentially my platform collision uses the closest platform, but since its returning the wrong platform it isn't working.
Finding closest platform:
Collision code snippet:
Additionally, everything works if the platforms are laid out differently.
This layout causes a problem:
But this layout works perfectly:
Please ask if you need any additional info.
Any help is appreciated
(Also if you have better ways to link videos please tell me)
I have code that makes the instance_nearest platform visible.
Essentially my platform collision uses the closest platform, but since its returning the wrong platform it isn't working.
Finding closest platform:
GML:
var currentPlatform = instance_nearest(x,bbox_bottom,obj_platform);
Code:
if (fall < 0 && (place_meeting(bbox_left, bbox_bottom,currentPlatform) || place_meeting(bbox_right, bbox_bottom,currentPlatform) || place_meeting(x_center, bbox_bottom,currentPlatform)))
{
v_speed = 0;
y = currentPlatform.bbox_top - 44;
}
Additionally, everything works if the platforms are laid out differently.
This layout causes a problem:
But this layout works perfectly:
Please ask if you need any additional info.
Any help is appreciated
Last edited by a moderator: