I am making a top-down puzzle game, similar to the old Chip’s Challenge… if anyone played that… I want to implement an ice-floor like in pokemon:
I have a problem, I have 360 degree movement, so detecting which direction i have approached the ice from can not be done by simply detecting button input. NOR can it be done by detecting the player’s facing direction.
The reason is:
- Pretend you are heading North-East, you approach an ice floor.
- You COULD step on to the ice from the south, orrrrr you could step on to it from the west. Both could be achieved with a 45 degree facing angle, and pressing UP or RIGHT buttons will not tell us whether the player should slide north or east.
- Notice that in Pokemon, the player can only slide in one of four directions, even though when you are not on the ice, you can go in 360.
Character controller and state machine are easy, I am stuck on figuring out which way I should slide.