Line trace channel hits enemy in editor NOT in packaged game

As the subject says.

The collision is correct. The capsule ignores visibility traces while the MESH blocks it.

In the editor it works as expected. When I package the game, the traces go right through the enemies.

What the?

Hi,

I attempted to reproduce this in a new project but it works in a packaged build the same as in the editor for me. Would you be willing to upload a small test project that has the issue? If so, I will try to help you debug it further.

Thanks for the reply. It’s happening on all my line traces by channel. And I should have Been more clear. It’s a single sphere trace by channel. Not a line.

Works in editor not in packaged game.

They hit walls they just don’t hit the enemies(char bp)

Anyway… I switched all the traces to sphere traces by object. This works in editor and packaged game so I switched em all. It’s just annoying cuz I needed to make arrays with the list of objects I want it to hit which is essentially all.

I never tried in a fresh project. But it’s a large vr project so … not easy to make it small and upload it.

I’m good with object traces for now. Tho there’s no real explanation for why the channel sphere traces work in editor but not packaged game.

I have confirmed that in a new project the Single Sphere Trace is working as expected during play and a packaged game. So it looks to be contained to your VR project. I’m glad you found a workaround for it.

Hey just wanted to leave a message here as I was dealing with a similar issue and managed to fix it, hopefully this might help someone that comes across this.

Everything was working in the editor, however once I packaged it it appeared that the events my custom object/ trace channels were supposed to be triggering no longer were.

My immediate thought was that it was an issue with the trace channels, however as it turns out there was an issue with how I was casting to the other blueprints.

Originally I had it set up that I would get the Hit actor of whatever my line/ box trace was hitting and then compare the display name of that to a ‘string (equal)’ node. This is fine for the editor mode, however not for the packaged version as you can no longer get the display names of actors.

Instead what I did is use an ‘object (equal)’ node and compare that to whatever my trace had hit. This worked perfectly for the packaged version.

Basically the take away is to double check if it is an issue with the traces or if its an issue with something that the traces have to do after they have hit, such as casting to another blueprint. I highly advise anyone who has come across a similar problem to put the traces on display mode and use print strings to rule out things that are or aren’t working and to test this in the packaged version.

Thanks for the reply to this thread. Def a different issue though. I don’t use the get display names for anything. I did at one point for “pickups”, nothing to do with line traces. This actually did work fine in packaged games, but I knew it wasn’t ideal way, so I changed that to get class and if class == whatever then carry on.

As for the traces, wasn’t doing display names at all. Was a simple trace on visibility channel. The characters were blocking the channel hence it worked just fine in the editor. When packaged it would just go right through the characters like it wasn’t seeing them. I left debugging on for the packaged game and could see them go thru the characters and hit walls.

Never resolved to this day, still using traces by objects. I’m on 4.15 now for that project… maybe its resolved in a later version… havent tried.

Make sure the object you are using is cooking. Some items have a checkbox that says IN EDITOR ONLY.