- Home /
Creating a Random Walking Script
Hello, I'm new to Unity and am having a problem with a VR game I'm trying to build.
The premise of the game is that a player is a farmer who needs to catch all of the kittens that are running around in the field. I am using this free kitten model from the Asset Store: https://www.assetstore.unity3d.com/en/#!/content/33121
My question is: how would I make a script that allows the kittens to run around the field (randomly), without hitting other things? The only other "things" would be rigidbodies, like the fence around the field, etc.
Thanks in advance!
Answer by Pokachu · Nov 29, 2017 at 08:46 PM
could make the kittens have a raycast out in front of them if there is a rigid body a certain distance away they then change direction randomly left right or back round
Your answer
![](https://koobas.hobune.stream/wayback/20220612135052im_/https://answers.unity.com/themes/thub/images/avi.jpg)