Created
October 20, 2012 17:53
-
-
Save shawngrimes/3924202 to your computer and use it in GitHub Desktop.
Move an object to the bottom left
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--Change the reference point of the object | |
myObject:setReferencePoint(display.BottomLeftReferencePoint) | |
--This will add a buffer of half the objects width, if you want it flush with the | |
--left, change it to myObject.x=0 | |
myObject.x=0 + myObject.contentWidth/2 | |
--This will add a vertical buffer of half the object's height, if you want it flush with the | |
--bottom, change it to myobject.y=display.contentHeight | |
myObject.y=display.contentHeight - myObject.contentHeight/2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment