[SOLVED] Issues with my vehicle Obstacles Avoidance & Road Follow

Hello dear people! I’m Tarti, 27, I apologise for my english ^-^’

My concern today is to succeed in programming a car that detects two things: obstacles and the road.

Explanations:

I have a vehicle with 3 sensors in front of it (Danger Left (turn right), Danger Front (make a small reverse) and Danger Right (turn left)) as well as 2 sensors at the front wheels (Left Ditch ( turn right) and Right ditch (turn left).

236851-delivery3000-avancement40.png

As for the obstacles, no problem for the left and the right, the car spots the obstacle and turns as much as it takes to dodge it. For the front sensor and my two road sensors, it’s a different story, everything seems perfectly functional and even works correctly once in ten.

But there seems to be a bug (the UE4 is so sharp that I have trouble telling me that it does not come from me) at the level of my box overlap and their tool “OnBeginOverlap” who have trouble really know what comes in and out in real time. So that my car can be faced with an obstacle without going back (while my variable “Danger Front” is TRUE) or to roll off the road without steering to recover the road in its variable (variable “Danger” Right “or” Danger Left "on TRUE and no reaction) .

(I translated the [Print Screen] in English from now on as on the first image)

My roads are splines created with the Spline tool and not a BluePrint with a Spline in it. I used the “Cast To Spline Mesh Component Class” tool to detect any Spline (and therefore any road).

The concern really seems to come from the triggers (Collision box) in themselves and I also wondered if resizing them (still on the scale, here 0.1 / 0.1 / 0.1 for the Road Sensors) was not everything buguer … unless you use a “Get Bounds” but I do not control this node.

In short, if you want to know something else, do not hesitate to ask :slight_smile: And obviously, if you have the walkthrough, I am a taker;)

Thank you in advance for the interest you could bring and in the meantime, I refine the code I’ll tell you if I find the solution :slight_smile:

I’ve found a solution. 4 LineTraceByChannel Sensors, 2 for the road (made with Spline Tool - not BP Spline Component) & 2 for the obstacles. It works Quite great <3 I try to post details quickly :slight_smile:

Sei que o post já esta antigo mais poderia mostrar detalhes do blueprint de como resolveu?