I’m making an traffic AI and now it’s time to make traffic lights/traffic signs.
Every traffic light/sign (actor) has a non-colliding cube component at the road and a car has a line trace following the road. When the line collides with the non-colliding cube, it gets the traffic light’s/sign’s message and sends instructions to the car. Simple!
My problem is the collision of the line with the non-colliding cube. When it’s solid, the collision happens and the car gets its instructions but, obviously, it crashes into the cube. If I change the cube’s collision preset into “Trigger” or “Overlap all”, the line doesn’t collide with the cube and nothing happens.
Please, what is the correct collision pre-set for this? Or, is there a better component to use for this kind of detection? Or, is there a much better approach?