- Home /
Question by
Kalbytron · Jul 16, 2014 at 11:29 PM ·
rigidbody2ddirectionangle
AI movement with rigidbody2d
I have an AI moving a 2D rigidbody in a direction that I would like to change after a certain amount of time. I don't want the AI to choose a new direction that is 90 or 180 degree from the direction it's going. How do I have it randomly decide a direction between (example number)45 degrees left and right?
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220613154258im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Issue with direction and rigibody2D 1 Answer
How do I get the direction of a moving object? 2 Answers
Aiming Direction of Player altered After collision 1 Answer
Converting direction to Vector2 2 Answers
how to drop mesh in all of directions? 0 Answers