Hello there! I’m currently programming an AI that can drive the cars in our upcoming game. For this to fully work, I need to send raycasts in all directions around my car to be able to provide data for the AI.
Currently, I’ve figured out all the directions I need except for the BackLeft and BackRight.
My back raycast’s direction is done like this: -backRaycastPart.CFrame.LookVector * distance
My front raycasts’ directions are done like this: Front: raycastPart.CFrame.RightVector * distance FrontLeft: Vector3.new(raycastPart.CFrame.RightVector.X, 0, raycastPart.CFrame.LookVector.Z) * distance FrontRight: Vector3.new(raycastPart.CFrame.RightVector.X, 0, -raycastPart.CFrame.LookVector.Z) * distance
Any ideas on how I could do BackLeft and BackRight?
That’s not how it works… I’m programming a self driving car using neural networking, I need to send the raycasts to get the AI to have something to work with. I’m simply using the distance from the car to the raycast hit.
The pathfinding service cannot drive a car, as far as I know.