Skeletal Mesh With Buttons and Knobs in VR

Can I get some advice on an efficient workflow for tying a skeletal mesh with buttons, switches, and knobs to blueprint code. I’m building aircraft avionics whose buttons and other controls will be tied to an external simulation via a shared memory space. I want to make importing new panels into UE as simple as possible. Ideally a new panel’s skeletal mesh could be imported, and added to a NewPanel_bp actor derived from “base_panel_bp” which automatically detects all the bones, and allows you to configure whether they’re a button, knob, etc.

Suppose I have a qwerty keyboard skeletal mesh, with each key having its own bone. I want to have an efficient way to tie those keys to a button actor that encapsulates the visual movement of the key using the corresponding bone, as well as the interaction logic of a hand overlapping a volume placed on the surface of the key and the firing of an event to indicate a state change of the key.

I tested out doing work in the construction script of base_panel_bp to iterate through all the key bones, but I can’t create the button actor in the construction script, so I’m a little stuck there. I want to avoid having to make an animation blueprint for each panel if possible, because I really am trying to make the process of importing new panels as simple as possible.

For posterity:
The solution turned out to be using the skeletal mesh in a poseable mesh component which allows you to manipulate bones using blueprint rather than an animbp. You’re able to simply get the poseable mesh component’s bone by name, and then set bone transform by name.

2 Likes