moving lights

Hey =)

I have a problem with the lights.
I have a building where the player starts that i want to have a lighting effect upon.
the building looks like this:

the light is suppose to travel with the green area, and simulate an emergency glowing light traveling thru the green area.
ive tried doing it in maya, but it doesnt want to convert into unity as an animation.
what should i do?
please help.
Thanx

Doesn’t work, it’s private. Please post what you need in your post.

Have you considered doing this in the animation window of Unity?

This is the model:

you cant animate lights from maya, you will have to do so from the animation window in unity, but animating the emmsive channel of the obje

What did you mean by “emmsive” ?
I havent found anything that lets me animate lights in unity.
I want the lights to travel like the landing lights on a airport landing runway.
Starting from point A. Then travel to point B. And start again at point A. And travel again to point B. And loop that.
At the same speed as a emergency light.

Hi, i guess there’s two things you could try, you could animate the light in maya like you said you tried to do and instead of trying to bring it over to unity which as you’ve already found out, wont work, just attach a null to the light and make sure it’s part of the hierarchy of your object, bake the animation of the light into the null (edit>keys>bake simulation) and in unity attach a light to it.
The second one is to just have a material that animated to simulate this, could be a sprite sheet, or just the overall intensity or color of the object.

Hope that helps, Good luck!

thanx Adur.
as a matter of fact, i tried to do as you said, i was smiling when i saw some one else describing what i thought was a clever way of working around a problem.
but i cant seem to make the unity created light stick to the null maya item.
the light didnt want to move with the maya created item at all.
but it was as a maya area light i was trying to have a unity area light attached too, then i switched to a spotlight, but with no effect there aswell.
but i like your thinking. wish i knew how others do it.
the sprite thing i have no idea how to make.
thats a whole knew area i havent time to check out just yet.
thanx anyway =)
might have to give it up till later.

haha, no worries… that’s weird that the light wouldn’t want to attach. Maybe some kinds of lights can’t be attached? I have done this same exact thing with an animated model from maya into unity using nulls which are attached to the character and animated themselves and attached light to it in unity and it’s worked with no issues at all… I guess the only thing I can think of that’s different is the fact that you are using area lights? I used point and spot lights and it worked fine… not sure what else to tell you.
Anyways, if you do figure it out let me know. I’m curious as to what is causing the problem.
Cheers!

A light is just a component attached to a gameobject. There is no issues with animating the position of a gameobject using Unity’s animations. If all you want to do is move a light around a path, just animate the game object’s transform, and the light will follow. If you wish to animate the properties of a light, you can do that too. I suggest you read the manual about animation (both legacy and mechanim), as this seems like a very trivial issue to solve.

Well, as far the the light moving around the object, I can see why anyone would opt to animate it or a proxy object in maya instead of unity. Animation in unity is clunky, it’d be much easier to just do it with a path in maya. I’m just curious why the OP can’t get what he and I described (using a null then attaching the light to it) to work…

@Fressno : How exactly are you trying to attach this light to the null object? Just curious.

I actually got a polygon object to be attached to the motion path in maya, and be converted safely to unity. and i got a spotlight to be attached to that polygon object. the animation in the animation preview window in unity shows the movement of the object as i want, but in unity, the spotlight wont follow the objects path when i press play.
the object just sits there idle.

Are you actually PLAYING the animation? is the animation component set to play on start, or is the default state of the Animator component is the proper one?

i havent made any scripts for the animation.
its culling mode is always animate, if thats what you mean.
no play on awake function.

You probably want to start here:

Understand how to get an animation to play.

its just an animation i want to activate at start.
no need to end it. what should i look at? i just want to know if my animation works.

so is the polygon you animated in maya animating once you bring it into unity and set it to always animate? You haven’t made that clear in your responses.

I dont believe Maya has that function.
you make the animation, and you have unity use the pre-recorded animation from Maya to use as often as you see fit. but Maya cant make an animation controller. it just makes a sequence you can re-use. but as far Maya converts it, its only one single animation unity is given to be in control of.

eureka!
i have got it to move.
it only does its animation once, but thats something.
now i need it to loop endlesly.
i added a Component under miscellaneous called Animation. i added it to the whole Parent.

i made this loop scripts:

using UnityEngine;
using System.Collections;

public class Loop : MonoBehaviour
{
    public Animation anim;

    void Start()
    {
        // Set the wrap mode of the walk animation to loop
        anim["Take 001"].wrapMode = WrapMode.Loop;
    }
}

and added it to the animation component, and we have liftoff.
now to tweak the lights to fit my needs.
but its all good now guys =)
off to bigger problems

Good to see you got it working! Good luck in your journey, don’t hesitate to ask if you’re stuck but of course, always looks around the forum and the unity answers pages first, (and the learning section!) chances are someone’s already had the same issue as you and has asked the same question before.

Cheers!