Contrain Y Position between 2 points
This should be easy but it is driving me crazy... I have an actor which is already contrained to an x position, and can be moved up an down based on touch position... However, I only want to be able to slide up and down between two y points (such as between y= 200 and y=500.... How do I do this? Thanks.
Comments
Hi! you can do in one line:
Constrain self.positionY To min(max(game.mouse.position.x,200),500)
I think you meant game.mouse.position.y...
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Ups! > @tatiang said:
Ups! You are right