I may be getting the wrong idea, but, it sounds like something that can be easily done with OnCollisionStay ( ) .
Check if it's colliding with X, then move (x,y,z)
function OnCollisionStay ( collision : Collision)
{
if ( collision.collider == existingObjectToCheckFor )
{
//do movement code
}
}
↧