Announcement

Collapse
No announcement yet.

Issues With my Collision Boxes on Vehicle

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Issues With my Collision Boxes on Vehicle

    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).



    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.

    I have seen with many topics that this problem seems recurrent for a while already, so if you want to move me to another type of artificial intelligence, no problem as long as it works!

    In short, if you want to know something else, do not hesitate to ask 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

    #2
    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

    Comment

    Working...
    X