Hi Scirra world
I'm searching the best way to stop a sprite with a 8-direction behavior against solids.
Actually, when my player hit solids with a not horizontal or vertical angle, it rotates randomly and stop after.
I would like to stop my sprite without any rotation, but i don't know how to do.
Can you explain me ?
You can test my game here :
Finally, i'v found how to get my player to bounce correctly.
If Player is overlapping SOLIDS at offset ((2* cos(Player.Angle)) , (2* sin(Player.Angle)))
Player 8-direction setspeed to Player.8direction.MaxSpeed;
FreezeCommands = 1;
FreezeCommands = 0;
FreezeCommands is a global variable. If set to 1, the joystick and keyboard moving events are disabled.