So basically I have a rectangle sprite and I want to rotate it, but I want to do that around a custom weight point (by default the weight point is situated in the middle of the sprite) which will be situated at the bottom of the sprite. So my question is: how to set a custom weight point?
I apologize if the question is very basic but I am new to Gideros. Also I apologize for any grammar mistakes I did.
Comments
http://docs.giderosmobile.com/reference/gideros/Bitmap/setAnchorPoint#Bitmap:setAnchorPoint
For Shapes
You can draw shapes relatively to the position which you want to rotate around (0,0 position)
Generic solution for Sprites and Sprite inherited objects:
http://docs.giderosmobile.com/reference/gideros/Sprite/setAnchorPosition#Sprite:setAnchorPosition
Likes: antix, rolfpancake, misterhup
I had this problem when I did not draw the shape around its center. The :setAnchorPosition confuses me, because the anchor-position is not the same as the point of rotation.
And another thing I don't get is the following:
Bitmap inherits from Sprite. So it has :setAnchorPosition. It also has :setAnchorPoint. What is the difference here?
Likes: antix
so
but Sprite:setAnchorPosition accepts internal position.
So