An alternative, if you don't want to change the origin, is to get the width of the screen, subtract the width of the texts bounding box, divide the result by 2 and you are left with the x coordinate for a call to setPosition with the default origin. Similar calculation to get the y coordinate.