Filtering trace hit result dilemma

A. is my current setup. I trace from the cam (player character), break hit results and if I get a hit, and the actor that got hit has a particular tag, I set “isAccessible” bool to be “true” (all that in player’s BP). Then in Actor’s BP I cast to player, get “isAccessible” bool and end trace hit coordinates where I place Actor on every tick, and if “isAccessible” bool is “true”, I make actor visible. If “false” - I hide the Actor.

The downside of this setup is that I have to have level made in 3D app to make sure accessible floor surface (static mesh) is where I need it to be. If I make modular level in the Editor or procedurally generate it in the Editor, there is no way to make my setup work.

B. is what I am currently trying to get working, but failing. Basically the setup is identical to A. except instead of using tag on static mesh floor, I want to place trigger volumes where floor is deemed to be accessible. I did that, gave volume a tag, but somehow trace doesn’t “see” the volume.

I also tried using overlap event in Actor’s BP, but it seems that it would work with Level BP only. Even then I couldn’t reference Actor I place in the coordinates of the trace hit. I was hoping to check in Actor’s BP if it’s inside the volume with specific tag, and if so, in Player’s BP I’d cast to the Actor, and get bool out of it (which would be set in the Actor’s BP based if it’s inside the volume). However, somehow I can’t reference the Actor in Player’s BP :confused:

I hit this roadblock and I’d appreciate some help :o

Thanks beforehand

P.S. Btw, I am open to suggestions :slight_smile:

Alright, I got it working, but it’s not quite what I thought it would be:

If boxes-actors overlap, it doesn’t work properly. The only way to get it work right is to place cubes very close to each other, but without having them to overlap. Tedious :o

I wonder if there is a way to extrude faces out of a collision box to create continuous concave volume.

At a high level, can you describe what you are trying to accomplish - e.g. Tag all visible actors so you can do X

Sorry, but isn’t it clear from the video? o.O

Here is what I am working on:

As you can see, I trace, get a hit, place actor-arrow there and can teleport into that location. Player can go anywhere. Cool, but not quite. I need to limit areas where player can go. That’s what previous video and the diagram is showing. If I get a hit and actor-arrow is inside a box, it’s set to be visible and a bool that allows to perform teleportation is set to true. Otherwise actor-arrow is hidden and bool set to false, preventing teleportation from working. This way I can lay out areas where I want player to teleport in the Editor.

Initially I used physics materials or Actor tag to do the same thing, but that meant for me to be authoring “path” in a 3D app, which I don’t want. I need to be able to do all this in the Editor. Thus, I chose this method.

Ok - so sounds like you want to move a “teleport here” widget around the world with the mouse…

First - do the actual trace from the camera to the location under the mouse cursor inside the tick of the 3d widget.

The output of the trace includes the object that was hit, so you can apply filtering logic then and adjust the visible state of the widget.

BTW - Instead of making widget visibly or hidden, perhaps make it red or green outline? Less jarring than flickering

Overall, looks pretty cool - could be interesting game…

Good luck!

Did you watch my video? It’s already working. And I am using VR HMD, not mouse (which really makes no difference because tracing is done from the camera)

There ya go: A new, community-hosted Unreal Engine Wiki - Announcements and Releases - Unreal Engine Forums

This is what I need, but for box mesh (unless I can use BSP brush as collision box)

hmmmm - Still not entirely following what your problem is… (and yes I did watch the video lol)

But sounds like you are thinking about blanketing your scene with special accesibilty volumes.
For this, you should create a custom trace channel - and use it in your trace. (Dont forget to set the collision setting on the volume)

Also - LineTraceByChannel is limited to a single hit, you may need MultiLineTraceByChannel.

:slight_smile:

Take a look at

Mitchemmc has created a teleport exactly like you are wanting. You can place volumes and/or setup a spline based shape that will act as a teleport location.
I believe its exactly what you are looking to accoumplish. You can limit where people can teleport to by only placing the volumes or the spline in said areas. Will prevent people from being able to teleport up walls and to locations they should not be able to.

Saw that thread and even asked him about it. It’s too complicated really (he is using procedural mesh stuff) :frowning: I’d dare to say overengineered :o

I think I’ll try extruding BSP brush and moving its vertices around to shape it into a volume fitting navigation area. Then I’d convert it into static mesh and use that as collision volume to test for overlap. I think that would be the easiest, most straight forward thing to do, if it works :o

Thank ya’ll for the input.

I solved this by making BSP volume of the shape I needed, converting it to static mesh and setting per-poly collisions, and adding it to my BP with begin/end overlap. Worked perfectly!

Perhaps I will discover some limitations along the road, but for now it works well.