I beleive this is it. Thw last only thing is. How do I execute something when I look at the object? Meaning I need this function to be checked all the time but as far as I understand continuous loops are restricted and things like Player Collide with trigger zone or On game Begin Playe are single time events.
Use the node “Single Line trace by Chanel”. This node trace a line between a start point (the camera) to another point (the object or a distance for exemple) then retrun what the line hit at the end. I just take this value and ask if the actor who is hit by the line is equal to the actor i want … And that it, if its true you see the actor, if not you dont. Youcan ignor certain actor (transluent material for exemple) and the line pass trough.
To finish I just ask if this 2 booleans are true (the AND Node). If both are true, that mean the object is not obsured by a wall for exemple, and if it’s in the focus of the camera :).
I edited my post for more details, do continuously check I use an every tick event :). That maybye cost too much cpu usage just for check that but i dont see another option
You know I really don’t get it. If you are running a line from Point A to Point B then if you point the barrel as Point B then wouldn’t that mean that by default that line will ALWAYS point to and collide with the barrel?