- Home /
Animation and Transform
I'm having an issue in my game where an animation is overriding my transform positions. In my case I have a Tower Gameobject with an Animation component on it. A child of that GameObject is a turret. The turret always faces towards the enemy, but when the animation plays it goes into its default rotation of the animation instead of facing the enemy. What I'd like to do is have the turret face the enemy AND have the animation play when it attacks. Any help would be much appreciated!
I think you need to provide some of your code over here to locate the problem. I got couple of things co$$anonymous$$g into my $$anonymous$$d:
1- You are changing your rotation values within the animation so your animation overrides your lookat script(probably your animation.Play is after your lookat)
2- You might have not put your animation.play or lookat to your Update function.
I agree with this. It could be that the rotation wasn't something you edited, but it's default value of 0 is set for the course of the animation
Hi @Vandarthul , I've the same problem, my animation is changing my transform values, How can i prevent that?
Your answer

Follow this Question
Related Questions
How to reset child object's transform 1 Answer
My character isn't moving 0 Answers
Parent Game Object to Camera? 2 Answers
Children not working with Parent Object properly 1 Answer
Object not Instantiating Correctly 1 Answer