Problem to center mi sprite head about posenet

hi, i am using the extension posenet but i am trying to use mi sprite head for move like head points using the example pose net aia. the head is moving but its a little far from circle head. and i dont know why because i am using the correct formula. here is my blocks and mi aia


Posenet_TestProject_new.aia (4.9 MB)

Possibly to do with the point of origin for an image sprite, which is not the centre, but the top left pixel ?

is the center from the posenet, no the center from the sprite image, my block indicate to move in the center of the circle head like the image, i uploaded a image that show about the bad alignment between the image sprite and the circle head.

I think your problem is how you calculate the 'center' of your sprite cabeza.
You probably should be subtracting for the y coordinate.
See the chart showing how the pixels are arranged in Creating Animated Apps
y values are numbered from smallest values at top of Canvas and increase downwards.

centerSprite

See below how to center

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.