R
ReadyEdgemont
Guest
I'm working on a platformer game where I'm trying to achieve a collision between the enemy and the player where the player takes damage and then is knocked backwards (in the opposite direction of his/her approach).
This is my movement code; http://pastebin.com/2Eyp07XN
Here is my collision code; http://pastebin.com/j4TVV59R
This is my current collision code with the enemy which deducts health; http://pastebin.com/MKjGCiYM
I've tried a variety of different approaches to this already, but most of the other fixes to achieve this rely on using the player's coordinates and changing them rather then using the speed coefficients I use. Any suggestions?
This is my movement code; http://pastebin.com/2Eyp07XN
Here is my collision code; http://pastebin.com/j4TVV59R
This is my current collision code with the enemy which deducts health; http://pastebin.com/MKjGCiYM
I've tried a variety of different approaches to this already, but most of the other fixes to achieve this rely on using the player's coordinates and changing them rather then using the speed coefficients I use. Any suggestions?