In the game engine, when i have my player walking around the scene it seems to slowly slide down slopes and ramps etc. How can I prevent this sliding from happening just like in most other games?
connect all the sensors you are using for motion to a python controller.
add a ray sensor, -z that will reach from the origin to below the actors lower collision bound. connect this as well,
sensors --------python Ray-------------/
import bge cont = bge.logic.getCurrentController() own = cont.owner Ray = cont.sensors['Ray'] your_sensor_1 = cont.sensors['YourSensor'] ## etc if not your_sensor.positive and Ray.positive: own.worldLinearVelocity*=.9 own.applyForce((0,0,(own.mass*9.8)),0) ##if you are on the ground and not pressing any movement keys like forward or backward ## stop moving