Home › Workflows › Make an object selectable

Make an object selectable

By the end of this you will have an object that highlights on hover and fires an event when clicked, pointed at with a laser, or touched with a fingertip.

Steps

  1. Open the actor Blueprint and add a BPC_Interaction_Select component.
  2. Set Highlight Class and Highlight Color.
  3. Optionally set Select Sound.
  4. In the Event Graph, bind to the component's On Select delegate.
Adding the select interaction
howto_selectable_01.pngAdding the select interaction
Adding the select interaction
The object selected in play, highlight active
AFS_UX_Select_result.pngThe object selected in play, highlight active
The object selected in play, highlight active

Notes

If the actor has several meshes and only some should be clickable, tag those components and set Relevant Components to that tag.

To veto selection conditionally, implement Interface_Select and return Override = true with Is Selectable = false.

To make a laser terminate somewhere other than the raw trace hit — the centre of a control, say — implement Select_HitLocationOverride.