The specific feature I’m concerned
about is focusing the camera on the
widget. I want to be able to walk up
to it press a key, so say “E”, do the
interactions and be able to leave with
say, “Esc”. I understand that its
complex, however, I do want to learn
and get better at BP.
This part is fairly straighforward.
Here’s my terminal actor:
- a Static Mesh for the monitor
- a Widget Component that will hold a widget where we can execute commands (with Hardware Input on!)
- a Springarm with an attached Camera
The widget for the above-mentioned component:
- it has a Border, Editable Text, and a Button with Text Block, they all sit in an Overlay panel
- when the button is clicked, we switch the camera back to the player, and allow the Player Controller to receive input again
- when the user types Esc and commits (you can Switch on Commit Method here, for more control), the same script is executed
Here’s the script in the Player blueprint that gives us access to the terminal:
- when the Linetrace hits the terminal, we take away control from the Player Controller and focus on the Widget hosted by the terminal’s Widget Component
- and switch to the terminal actor’s Camera