Using raycasts to detect objects and move around them?
I figured this is doable with a mover and rotator and some conditions set up using the raycast, but I cant seem to figure out the right steps. I can get the raycasts to detect, and the object will start to rotate, but at that point it just keeps rotating in a circle.
The idea is that it could move forward consistently but maneuver around objects and curves.
Any help would be super appreciated!
-
You could wire the ‘hit something’ output from the raycast into the speed (or power) of the rotator. You could also plug this into an invertor and use that to power the forward mover.
As long as the raycast is fairly short the object will only slow down and rotate when there is geometry in front of it, and when there isn’t geo in front it will move forwards.
Hope this is helpful :) Peter
請登入寫評論。