This has been driving me mad so any help would be greatly appreciated!
Using a cube as an enemy that follows the player. Once within range the enemy attacks. Have made a simple animation for attack in Unity and call it when the enemy is in range of the player. This works fine. But… I want to have multiple enemies in my scene. All using the same animation when attacking.
Problem lies in the animation coordinates. When building the animation x,y,z for the animated object are added - for starting and finishing. So when I move an object with this animation to a different position and then the animation is triggered it snaps back to the original animation position.
I hope this makes sense. I have tried parenting - so empty gameObject with animation attached and enemy objects as children. This works to an extent - I can reposition the children in the scene and they don’t snap back. However their positions are fixed - they cannot move independently.
I have been at this for days, please help!