python based movement help

hello i am making a simple rollerblade racing game and i am using python to control the “player” movement and using a raycast to detect wall but for some reason the “player” stops some distance away from the wall and i cant figure why
Ag game2.blend (530 KB)

http://www.pasteall.org/27561/python
what i basically did was tried to merge 2 of solarlune’s scripts into 1 here are the links
http://solarlune-gameup.blogspot.com/2011/02/using-python-in-blender-game-engine.html and a drift less movement script

The problem is in your “AxisCheck” function.

Change this:


topos.x += (Sign(mx) * size) + mx 
topos.y += (Sign(my) * size) + my

To this:


topos.x += (Sign(mx) * size)
topos.y += (Sign(my) * size)

That should do what you want.

thanks its all good now