Hello eveyone, newbie here.
I want to have some behaviour when some static meshes are clicked. In particular, I’m starting with two:
- the player clicks a lever, it rotates and a door opens
- the player clicks a key and and it disappears while a text appears on screen
I understood how to perform the single actions in code (e.g. rotating an actor, popping up a text), trace the player “line of action” and see if it intersects a component, but I don’t know how to link them.
Should I create a component (on the respective static meshes) for each event I want to trigger? If so, how do I link it to the player clicking it when it is in range?
Thank you in advance.