Moving objects problem (501626)

I need help moving objects when I exit a trigger.
My trigger is just an empty game object set as a trigger.
I tried setting multiple objects as children to the trigger so that everything would move, I used deltatime becouse i wanted it to slide.
I also wanted the trigger to delete itself after i exited it, but I didn’t know how.
This is what i have, but it doesn’t work:

function OnTriggerExit() {

transform.Translate(2*Time.Deltatime,0,0);

}

I think you need to look up “coroutine” and “lerp”

http://docs.unity3d.com/Documentation//ScriptReference/index.Coroutines_26_Yield.html

it’s also “deltaTime” not “Deltatime”… either way Time.deltaTime would only make something “slide” if you were using it within the main Update function.

If you have the OnTriggerExit function call a coroutine that lerp’s the transform’s position I think you’ll get what you’re after

Thanks :slight_smile: