I would like to be able to click on two different meshes which are part of the same blueprint and make each have two different interactions.
The reason they are connected is rotation, both meshes need to rotate 180 ° and stay in the same arrangement.
This should happen:
Click mesh 1 → rotation (I have a scene that rotates three meshes)
Click mesh 2 → material change
I tried with a branch but I don’t think it’s the correct setting: rotation happens, reverse doesn’t and neither does material change.
I hope there is a way because the only solution I have thought is to alternate the visibility of the second mesh and also of a copy of this in the position that would have had a 180 °. It would be more messed up like that…
You need to use a Line Trace (or HitUnderMouseCursor if you’re clicking with the mouse), and in the hit result you’ll be able to get the hit component. From there you can do what you need based on which component you clicked.
You could still use tags to filter interactions more granularly if needed. Perhaps this actor has elements that you’re not supposed to interact with, or interact in a specific manner.
…don’t worry about it, looks fine. It will be populated dynamically as soon as the Interface message is sent. We cannot fill it now because we don’t know what you’re going to click, not yet. It can be any component out of a million in the game.
This variable will hold a reference to the selected component.
I was referring to the fact that I had
promoted a variable Actor Component
type and called it “Interactive
Component” and I thought I needed to
assign a component to the variable.
No need to assign, as above - we don’t know at this point what is going to be clicked. To me it looks like you did it correctly. When you send the message, remember to specify the component:
I put the tags there, I thought should specify them here too:
352977-
][2]
However now it works thanks to tags. I don’t know why I kept having problems before, I only restarted UE…
Thanks so much for your help!
I was referring to the fact that I had promoted a variable Actor Component type and called it “Interactive Component” and I thought I needed to assign a component to the variable.
This is because I didn’t understand how to do this step: