Locking a static object so it cant move past a certain point. help pls

Hi, i have a game where the palyer can move side by side, but i cant figure out how to make the player not move of the screen, i cant use walls cause the object is static so just goes through them. Can i make it so the player cant go more then say -50 position and +50 position on the x axis? If so how?

Thanks

Use a constraint actuator with location constraint or check your position with python. But normally it would be better to use a dynamic player setup.

How this could be done in python:
http://www.youtube.com/user/moerdn666?feature=mhee#p/c/666DEE9D70C38F3A/1/kRt3jjbwmhE

greetings, moerdn

thankyou, since its due tomorrow i dont have any time to learn python but i gave the constraint a go and worked perfectly, exactly what i wanted. Only my first 3D game so doesnt matter to much that it isn’t the ideal way, that can be for my second game. Thank you :slight_smile: