01-05-2015, 08:54 PM
The flaw in your movement system is that pressing left or right automatically assumes you have moved. What happens if you're facing a wall though?
You need to check the player actually moved - is their new coordinate different from the old one?
I would take all the variables for position and test them - Old - New = 0 means no movement. Old - New = +/-1 means movement.
A simple step to add.
You need to check the player actually moved - is their new coordinate different from the old one?
I would take all the variables for position and test them - Old - New = 0 means no movement. Old - New = +/-1 means movement.
A simple step to add.