Example follow script(SOLVED)

I copied the “follow” script from the official example and applied it to the game as a test. Until yesterday, the sprite followed well where I click, but today it runs away when I click, just as the center of the sprite is applied to the corner of the sprite. In addition, not only follow scripts, but twin animations scripts suddenly changed like this… I can only explain that the central point of the script seems to have changed. Did I make a mistake?


When I click red dot place, my sprite goes there…

Check in the editor if you have accidentally moved the sprite component within the game object instead of the game object itself.

Remember that when changing the position using go.animate() or go.set_position() it is the game object that you are moving and not the sprite. The sprite and any other visual component will follow along, but they can also be offset from the gameobject itself in the editor.

1 Like

Thanks!!!

1 Like