Limit movement of actor between x value
I want my actor to be able to move between the x values 0 and 320, so that it can't move out of the screen. How would i do this? appreciate the help! ![]()
I want my actor to be able to move between the x values 0 and 320, so that it can't move out of the screen. How would i do this? appreciate the help! ![]()
Comments
Use Constrain and set self.Position.X to max(min(self.Position.X,320),0)
Thank you