L
lelo9444
Guest
I'm working on a 2d platformer that has slopes. A problem I have stumbled into is that while normal slopes work fine with what I have when I flip them over in the Room Editor their collision box gets jumbled up. My current code checks for a 1 pixel space above a pixel to see if it can place the player there when they move into a slope. The problem is the flipped slopes seem to ignore their first pixel for some reason (thus making them start with a two pixel height).
I could easily fix this by making more objects for the opposite slopes but I would prefer to know why this happens first and if I can solve it.
(I'm 99% sure the problem is that the flipped slope starts with a 2 pixel height as it ignores the first pixel of the 45 degree slope, I have checked the code multiple times and I have even seen the faulty hitbox in the game)
I could easily fix this by making more objects for the opposite slopes but I would prefer to know why this happens first and if I can solve it.
(I'm 99% sure the problem is that the flipped slope starts with a 2 pixel height as it ignores the first pixel of the 45 degree slope, I have checked the code multiple times and I have even seen the faulty hitbox in the game)