Stealth Game Course - Line Trace Issue

Hello everyone! I am working on a custom stealth game while following the course and using some of the same mechanics and everything.

I am having a problem where the sensor camera is detecting the player through walls because of how the detection is set up for it in the course. So what I am trying to do is cast a line trace when the player is detected in the zone, and if it hits the player it means they are visible and the meter should increase.

However, for whatever reason the line trace is going through the player and ignoring it. I have checked the collision channel and don’t know why it is not detecting the player. Screenshots and a video are below.

Collision Settings of the Player Chracter

My Line Trace from the camera to the player

DetectionSensor TriggerDetectionZone Collision Settings

Video Showing the Line Trace shooting at the player, but not detecting.

The video shows the player not getting detected, I have my blueprints currently set up to print the detected actor hit from the line trace.

Can provide more info if needed. Thanks ahead of time to anyone who assists.

I found my issue just after posting this. The trace is shooting in front of the player and not hitting when it is cast. Will post solution is I find one.

Okay so all I needed to do was create a really large sphere trace, but now make sure all the walls are objects that don’t need to be traced are not traced.

You have to create the custom collision preset here for this method, but it is working for my project so it’s good I debugged my own thing after typing out my problem here!

I actually needed a better method, so what I changed to was to use a for loop with break and create a bunch of sphere traces that are smaller that go acrost the entire of the capture area of the sensor area, this helps not hit so many objects, and also eliminates various problems like entering from one side of the sensor and it not detecting.

This method was a bit more advanced and not recommended for anyone new to blueprints and coding and is following this course.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms