i wann create hats for my character, so i have created point "1" everywhere i need on my basic animations like "running", "jumping" etc, and everytick my hat set position to this point "1" on my character. but my character also has position to other sprite which is origin platformer. and when I am running, my hat has delay, so character is running, but hat has position not on the point, but a bit behind. it happends when im moving, running or jumping, when im standing everything works alright.
I actualy can make different animations for each hat, but it would be stupid, so i wanna just set position, but it works different.
can some1 help me with this problem, or suggest another way to arrange my hat?
Without seeing a capx it is hard to say what is causing the delay.
My guess is you are moving the character or changing the character animation and not setting the hat in the same event.
Make sure the event that moves the hat to the character is placed after all the events that move the character, otherwise you could be moving the character away from the hat after it's already moved and it won't move to the new position until the next tick.
Alternatively, you could add the Pin behaviour to the hat - then you just have to move the hat once (on creation) and pin it, then it will move with the character automatically.
Develop games in your browser. Powerful, performant & highly capable.
I have seen lag like that. The only way I was able to fix it was to pin everything to the same base object.
So, position the hat to the imagepoint on the head, but pin the hat to the same object that your character is pinned to, and everything will move together!