Line Trace doesn't work when overlapping with Sphere Collision

Hey everyone. I have set up a line trace with a blueprint interface that helps me interact with objects when I look at them. I also added a sphere collision with widget on my static mesh to make E key appear on screen when I am close to the mesh (overlapping the sphere collision). The problem is, when I am outside the sphere collision, line trace works fine. But when I am inside the sphere collision, line trace doesn’t work properly. When I look somewhere else, I can interact with the object but when I look directly into the object like what its supposed to be, I cannot interact. I have also tried changing the collision settings on SphereCollision to ignore my line trace, but still doesn’t work. I am adding the images and video for you to further investigate. Thank you for your help.

This is my E widget blueprint.

This is the sphere collision for E widget blueprint.

This is for turning radio on and off. Interaction Blueprint.

This is line trace blueprint for interaction.

This is the collision settings of SphereCollision to ignore line trace.

So I am trying to turn radio on and off by line trace, it works when I am outside the sphere collision but doesn’t work properly when I am overlapping the collision.

And here is the video to my problem to make it clear:

Thank you for your help.

1 Like

hi @KatBurntDown

Why are you showing the interact key then using a line trace?

Shouldnt you just have a trigger sphere then when the E key is pressed test that its in an overlap and trigger it accordingley?

upto you but think its simpler no?

Stewart

otherwise use the sphere just to show the interact but ignored by ray collision , make a new box collider around the radio to detect rays

Actually I am using line trace to interact with the object. Sphere Collision is only for the widget to appear on the screen. I want to have it this way because I don’t want the player to be able to interact while he is not looking directly into the object. So I have tried the solution you have stated but even if the sphere collision ignores the line trace, it doesn’t work as shown in the video above. So strange.

so you are not triggering the ray trace on the sphere just a collision box on the radio then?

Yes just like that.