Best way to compare actors in C++?

This is actually quite irritating, as my original code actually works correctly this way (code I had prior to creating this post)… Thanks for all the help!

Might I recommend creating an actorComponent class, this type is effectively code that you can “bolt onto” any actor in it’s blueprint/c++.
It doesn’t have any display mesh, but allows you to add functionality.

I use a similar system in a game i am developing.
all intractable objects have a “GameObjectComponent” added, when I trace something I check if it has such a component and proceed to call “interacted” on that part.

I’d provide a code-sample, but i’m away from my codebase at the moment.

I Belive brushes work somewhat differently in the engine.

Haha, I was working on implementing something similar to that (a modular component class that allows me to perform checks and expand the functionality of related classes without modifying the base classes) before I came here to seek help. That’s exactly what I wanted to achieve with it, too. No need to provide such a sample, thanks for all the help you’ve already given me.

Hmm, how so? Because the default arrows, door and the bush aren’t detected in the raycast, regardless of where you look. I’ve looked everywhere and they still aren’t detected. It continues to show the “StaticMeshComponent0” as being hit. Whereas, when a chair is hit it shows “InteractableMesh”.

Also, for some reason the value stored as the actor in both the interactable class and the hitResult is “Bush”, even thought it’s now a chair?

You are very welcome :slight_smile: