Animating enemies not working - record transform changes but then nothing happens when played (Unity 2018 issue?)

Hi. First time posting about anything from this course but can’t seem to find a plausible solution on my own. I am using unity 2018.2.4f1 for the project & have had no issues up until now. When I go to record the animations for the enemy ships in Wave 1, the key frames are set at both the start & then the end positions, with it taking 4 seconds. But then when I go to scrub the timeline to preview the animation nothing happens. The ships remain in the end position. When I click preview the ships return to the start position & then when the play button in the timeline is pressed, the ships instantly jump from the start to the end position - no smooth animation. Ships are not set to static. Really puzzling!

Hi Chris, welcome to the community :slight_smile:

In your video you select Wave 1 in the Hierarchy before pressing player, but the animation is for Enemy Ship 2. Try selecting the corresponding GameObject before pressing play and see if you then get to view the animation.

Hi Rob. Thanks for the reply and welcome. I tried all combinations. Weirdly, overnight it seems to work for just one of the enemy ships but I still cannot get it to work for any other ships. I have tried starting from scratch and adding the enemies in - is it important how I do that? For example, I have tried both duplicating specific children of the enemy GO & moving them to Wave 1 and also adding ships directly to Wave 1 from the enemy prefabs. Either way I am still running into the same issue. Have attached another video. Really puzzling this one.

HI,

Could you zip your project files up and share them so that I can take a quick look for you?

The forum will allow uploads of up to 10MB, if your project files (zipped) are larger than that you would need to use a service such as Google Drive or Dropbox, and then share the URL.

Quick question, and maybe you’ve solved this by this time, but have you looked at your curves or dopesheet? Either of these areas will tell you with certainty if anything is happening. If not, you may try Ricks method of “wiggling” the enemy for the first keyframe, moving the time line, then moving enemy. It seems to help versus “Record > Set Keyframe > move timeline > set keyframe”. With the latter, I get a similar issue you’ve described.

All in all, looking at the Animation’s dopesheet and/or curves can tell you a LOT about what’s actually going on with the animation.

Hope that helps!

Privacy & Terms