So I have this ray_cast_3d that I want to rotate towards a specific vector.
For context the player is chasing the enemy and the enemy direction is set to -direction_to_player which makes them run away properly, but I also want to rotate the raycast towards the vector so it can detect for collisions in front of the enemy for direction change. How can I achieve this?
#Rotating a raycast towards a vector
1 messages · Page 1 of 1 (latest)
You could havee the raycast "looking" into the walk direction of the enemy by default. Then just have it be a child of the enemy and the raycast just rotates with it's parent. :)