This seems like the most basic thing but I cant seem to get it to work.
Im just doing a simple linetrace from player to object, and a true/false to determine if its a chair or not a chair. Unfortunately the equal to object node always returns false, I understand that its because the output is an actor comparing to an object, which will always fail. But I dont know how to get the object type of the static mesh actor to compare using the equal to node.
Right now, as you can see, its getting the instance name (sm_chair11) instead of just the object type (sm_chair) which is what I need to compare to.
Also I cant use the “cast to” solution as that doesnt work with static meshes, only actor BPs.
Huh maybe its fate but I just took this screen shot to ask my own question, weirdly enough it shows you exactly how to set up what your trying to do! The linetrace is returning EXACT references to specific actors, and you are just saying “check and see if any of these Specific Actor references are equal to the Generic Blueprint itself”, not any particular reference, which will never be true.
Compare the hit result to all known references of the actor your trying to get a hit result for using a “Get all actors of class” node and a “For each loop” node.
Many, many ways to ID something. Tags, Interface Queries, custom IDs. But perhaps all you need is to compare the class if you’re looking for chairs only:
Compare the hit result to all known
references of the actor your trying to
get a hit result for using a “Get all
actors of class” node and a “For each
loop” node.
I’d avoid this at any cost. Slowest, the most inefficient, ham-fisted brute force method Last resort only. I’ve yet to run into a situation where this would be needed.
Unfortunately none of these answers work as they all rely on the query to be an actor (BP) and not a static mesh.
Im specifically trying to get this to work with static meshes, SM dont have tags, they dont appear in get all actors of class and getclass only returns “staticmesh” not “sm_chair”
omg, u genius… Tell me pleas, can I make my only particle from the Niagara fountain recognize which specific static mesh it hit?omg, u genius… Tell me pleas, can I make my only particle from the Niagara fountain recognize which specific static mesh it hit?