Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I'm not getting warm with the Unity animation editor.

This is what I want to do:enter image description here

The 2 lasers should be like this, rotating 360 degrees over and over. .The classname laser2 doesn't mean anything, I implemented 2 concepts therefore this is the laser2 class. However, the animation editor seems to have a problem with having the same component more than once. I'm only able to animate the first laser. enter image description here

As soon as I open the Laser2 section, it opens both lasers and changes in it are only stored in the first laser. Is there way to make them seperate? Having the exact same class twice (with different name) will help but that's an unbelievable dirty solution. I did not do much with the animation editor so far so maybe there is some easy fix that. Edit: Startangle is the value which must be animated on both.

share|improve this question

1 Answer 1

Make them separate game objects with a shared parent node, so you only have 1 instance of the script on each object. Put the Animation component on the parent, and you can animate each child independently.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.