Hi folks, probably a really simple question, but it's not so obvious when you're not terribly familiar with maths.
I'm in the process of developing an engine for a scrolling brawler, and attempting to use a variable to determine the current floor position of an Active. It's working pretty well for jumps so far and I'd like to move onto knockdowns, in order to do this I'd like to use the floor variable to determine whether or not the player is in line to hit them.
The purple line would be the pixel where the floor position lines up with the enemy, but I'd like to expand the detectable range up and down a few pixels into the orange line area too, so the window where the enemy goes into it's attackable state would be wider, can someone suggest the formula I should be using to determine this?
Thanks as always
Please login to see this attachment.