Max/Min on X axis?
DrGlickert
Member Posts: 1,135
So I'd like to make my player not be able to move past a certain point on the X axis...(I'd use collisions against a wall, but I need the actor to be able to move slightly past the side walls (so like halfway off).
What's the best way to do that?
Constrain attribute?
What's the best way to do that?
Constrain attribute?
Comments
if self.position.x>480
--Constrain self.position.x to 480
if self.position.x<0
--Constrain self.position.x to 0
Atleast that is one way to do it.