In my project I have a number of rigidbody spheres, which can be dragged by the mouse (drag body script). I was wondering if it is possible to make them move around the screen at random also. I have no character controller therefore, AI would not work for me. Any ideas? Thanks!
How random do you want them to be moving? There are different levels of randomness that you could be using here. The simplest (and most chaotic) would simply be to use
every FixedUpdate. However, you might want something a little bit less random- so instead change the rate of change every frame-
Do you want your rigidbodies to be acting only in two dimensions? What about bouncing off the walls? Doing it this way will still allow the objects to bounce normally, so simple collisions should work.
answered Nov 10 '11 at 10:13 AM