Question by
aks850745 · Dec 21, 2020 at 06:09 AM ·
c#raycasthitrotate objectmaze
I want to make a bot which simulate the maze solver using left hand rule ( wall follower).
I want to make bot using raycast to measure distance from wall and if we gets a way in left then turn left otherwise forward if this is not possible then turn right. I am a beginner in unity and C#. I have tried writing code to rotate a cube 90 degree if distance from front wall is less than 2. But when i run the code it works for first collision but at second wall ( after first rotation) it starts roating 180 degree.
Comment
Your answer
Follow this Question
Related Questions
Character Rotation 0 Answers
Level generator freezing on creating bigger level? 1 Answer
Strange rotation in my character 0 Answers
About AI detecting a sound 1 Answer
Rotating a 2D overlap box based on another object's rotation. 1 Answer