Repel then Return

Guys I’m really stuck.
I have flowers sticking out of the ground and a bee, which is attached to the touch event so it follows the user’s finger around the screen. What I want is for the flowers to avoid the bee. So if the bee is within a certain radius of the flower head, that flower gets repelled from it, but as soon as the bee exits the radius, the flower returns to it’s original position…

The idea is simple but the rigidbody physics aren’t working, so perhaps it’s better to do it with OnTrigger… Any advice?
Thanks

You require rigidbodies.

No rigidbody = no object is physically moving = no trigger or collider will react.

This is what I have so far. I add this code to the objects I want to repel. And make the repeller object a rigid body. I only need the repel to happen in 2D and only in the Y axis. The question is, how do I make the objects return to their original position OnTriggerExit?
Also is there a way to smooth out their movement away from the repeller. Hope it’s clear. Thanks

Have added the original position to return to, now need to be able to lerp it. Any ideas?

//NB The + / - figure should equal the repel object scale.
var position : Vector3;

function Start (){
position = transform.position;
}

function OnTriggerStay (other : Collider){ 
if (other.transform.position.y < transform.position.y)
    transform.position.y = other.transform.position.y + other.transform.localScale.y; 
else{
	transform.position.y = other.transform.position.y - other.transform.localScale.y;
}
}
function OnTriggerExit (other : Collider){ 
transform.position = position;
}

iTween rocks!

Have used it to return the objects to the starting position. Now just need to figure out how to smooth the movement when the object are actually repelled. Because at the moment they jump upward by a set amount of units (same as repeller object scale). Still, it’s progress :sunglasses:

var StartPosition : Vector3;
var EndPosition : Vector3;

function Start (){
StartPosition = transform.position;
}

function OnTriggerEnter (other : Collider){ 
iTween.Stop(this.gameObject);
}

function OnTriggerStay (other : Collider){ 
    transform.position.y = other.transform.position.y + other.transform.localScale.y;
}
function OnTriggerExit (other : Collider){ 
iTween.MoveTo(this.gameObject, StartPosition, 2);
}