- Edited
Hello,
I am making a game where player can swap places with selected one of 3 statues in level. Now I am stuck on issue where two objects when switching places moves slightly on X axis.
This is current switch function on player script:
I have tried many options, like using local position, global position, transform.origin. I have also tried messing with collision shapes and pivots. I found similar issues online that includes pivot and parents influence but it doesn't seem to be an issue in this project. Parent object is Node2D with 0,0 position. Objects root node is CharacterBody2D. Can anyone can help because I cant find what is causing this?