Get Instance from LineTrace HitResult
am working an Attack function that works by using a ShapeTrace to map out a volume and return the Actors is collides with. My goal is to be able to call the classes derived from the actors that collided with the Trace and trigger some functionality specific to that actor, i.e. if destructible, destroy it or make it invisible.
Currently I am able to map out the shape trace from a button mesh and get a FHitResult that returns the Actors information but I want to get the instances class that is derived from that Actor.
I am aware that in blueprints you can cast an Actor to its derived class using the "Cast To ()" node and I am looking for a solution in C++, due to my casting constantly failing.
Also I am aware of the spelling error with the Casting Class
asked Oct 21 '18 at 10:17 PM in C++ Programming
Follow this question
Once you sign in you will be able to subscribe for any updates here