Jump to content

Emissive + multiple lights on one model?


Recommended Posts

So Friday I was struggling with trying to figure out how to get my little Gemini Lander Can to work. Yesterday I left town and thus don't have my work files with me, but the question was eating at me so much I had to post. After going to see what I DID have in game so that I could share, apparently I managed to delete them off my cloud folder. So, I'll try my best to describe it so that next time I can get it done right.

So the lander can has two headlights, as well as windows. I want the windows to light up, as well as the two headlights, when the user hits the lights button. I was able to apply a color animation to the pod using the new Unity 5 method, and then added the two spotlights to the animation. It doesn't seem to work. In the VAB, the pod has the proper "Lights On -> Lights Off" for the ModuleAnimateGeneric, but I also have two more sets of both "Lights On" and "Lights Off" buttons from the lights.

Where do I put the animation in Unity? I have no idea how those animation tools work. Do I have to merge the animations? Do I delete the animation line from the two ModuleLights?

The Unity setup was:

Wrapper GameObject
   -> Lander Model (This has the animation on it..?)
          -> Collider
          -> Spotlight1 (Does this need the animation on it?)
          -> Spotlight2 (Does this need the animation on it?)
   -> Hatch Collider
   -> Airlock Collider

Link to comment
Share on other sites

if you want windows to light up at the same time as the spot lights combine them all into 1 anim, and drive with 1 ModuleLight. Compile the color animation clips before adding the Light Intensity/Range properties. This will respond to "U" key.

if you want them separate, use AnimateGeneric for the windows, and ModuleLight for the spotlights. You can have multiple light objects in a single anim, but Unity will complain if they're same names as Animation Clip won't know which is which. Name them differently and point ModuleLight to one of them. AnimateGeneric doesn't respond to "U" key.

the animated objects have to be child of the object hosting the Animation Component, or the host object itself is animated. how they are arranged below doesn't matter.

Link to comment
Share on other sites

39 minutes ago, nli2work said:

if you want windows to light up at the same time as the spot lights combine them all into 1 anim, and drive with 1 ModuleLight. Compile the color animation clips before adding the Light Intensity/Range properties. This will respond to "U" key.

if you want them separate, use AnimateGeneric for the windows, and ModuleLight for the spotlights. You can have multiple light objects in a single anim, but Unity will complain if they're same names as Animation Clip won't know which is which. Name them differently and point ModuleLight to one of them. AnimateGeneric doesn't respond to "U" key.

the animated objects have to be child of the object hosting the Animation Component, or the host object itself is animated. how they are arranged below doesn't matter.

oh! That explains why I was having so much trouble! I had the animation module and two light modules! I'll try it with just the one - thanks!

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...