How to Move the Object Randomly towards the screen

Hi All,

I need to move the object randomly(like spiral) towards the screen…now my code is working like straight towards the screen .i just changed the z position.

How to Move the Object Randomly(like spiral) towards the screen

Thanks

As you move the object toward the camera, use transform.RotateAround to rotate it around a central point. The code will probably look something like:-

var orbitPoint: Vector3;

function Update() {
     ...
   transform.position.z += movementStep;  // ...or whatever you've called it.
   orbitPoint.position.z += movementStep;
   transform.RotateAround(orbitPoint, angleStep);
     ...
}

Hi All,

me also looking something like to moving an objects towards the screen randomly.i want give the flying[like] effects[Move around the screen] to that object.i tried,but i am getting like only shape[circular ,Hexogonal,Pentagonal shape] not random direction.If anybody know,please guide me to do that.

Thanks,

Hi anybody there.Please reply.i want to do the bee moment randomly in front of the camera.If anybody know,please give me the suggestions.

Thanks in Advance,