I think this is an easy one.
I have a BP where I’m adding a Static Mesh in the Construction Script so I can select an Static Mesh to appear in the viewport. But I would like to add complex collision to it in order to add CollisionByObject (for using a TraceLine).
So how should I do it? This is what now I have so far:
That’s what I guessed so I just changed the Static mesh Collision Preset to one custom I created, but it doesn’t get the Trace or any Collision still. That’s why I thought I should add it within the BP.
The SM selected within the BP setting on Viewport.
The Trace recognizes other actors with that collision preset but not the ones I’m creating through this new BP by adding Static Mesh node etc.
So what could I be missing here?
Thank you so much for your answer btw Evil_Fischi!!
Okay uploading pics of it. It looks it has the collision set properly… so idk what’s wrong.
Also tried it out with a starter content SM changing it’s collision preset to the same one. Not working either…
The static mesh has already a collision so you don’t need to add another one
So if you want a complex collision on your mesh you can change it in the static mesh object itself.
can you show the collisions in the viewport (press alt+c)?
Maybe your chair has no collision at all…
Have you tested the trace against the same BP but with one of the engine content meshes?
I think you need to declare for what objects you are tracing for.
Personally I use the linetraceByChannel, because there I don’t need to declare what objects should be considered.
For now I just need to get the Trace result True so I guess this is the only relevant part for it?
The rest of the logic from here is just about Widget HUD stuff so I think it’s probably not important for solving this
Okay I tried it and that works. TracebyChannel gets the hit. But it’s probably too tricky for me because I should change a lot of stuff in consequence from this. So how could I declare the Objects I need instead? Any way to declare the Objects with the precise Collision Preset I need?
If I get to do that, would simplify my work a lot…
hm why would it be so complicated to change the traces? basically you would only need to change the trace node and then just check if the hit actor is your BP.