I want to know how can i rotate character automatic on the ground like this picture:
Develop games in your browser. Powerful, performant & highly capable.
you need to make an everything to a physical object, but then becomes you 8 direction tool useless.
For player moveing you need to use custom movement and let him accelrate in the direction that it pressed.
This will be very tricky and you will loose a lot of performance
a trick would be to know the slope at all points in advance.. if you knew that, then by using a lookup table you could figure out the angle. it'd work for predefined layouts and surfaces that do not change.
a lookup table would be resource efficient.
PS: another way would be to find which object you are standing on, assuming that the surface is a series of connected blocks. if that is the case, then you can just find the angle of the object you are in contact with, then adjust your own angle accordingly.