Download

comparing trace impacts

Hey

I’m using single line trace for objects in a blueprint. I’m feeding the on hit into a break hit.

Now I’m wanting to check to see what type of child actor the ray cast is impacting. but everything i try comparing returns false. i thought maybe i could get the class of the hit actor object and compare that to a new variable with that class assigned , but i cant find a class equals…

Any tips would be a big help

thanks

Jey

Hi Jey,

There are no class == or class != nodes exposed right now, we’ll add them in a future release. For now you can try using a Cast to … node instead.

Also depending on what you’re doing, you might want to explore collision channels (https://docs.unrealengine.com/latest/INT/Engine/Physics/Collision/index.html) and narrow your traces down to only hit things of the type you are interested in (this can also be a performance optimization). I don’t know if there is documentation about it yet, but you can define custom collision channels for your game in Edit…Project Settings…Collision.

Cheers,
Michael Noland

Thanks Michael

The second way is much better, I’m glad you showed me that, as that was going to be my next question.

Cheers