[Plugin] Leap Motion - Event Driven

You should be able to just attach the sword to a socket/bone. Use the wrist or palm bone. You can also go into the skeleton and create a separate socket parented to a bone and attach objects to there.

You can move any enabled physics actors. I haven’t had much experience with physics actor constraints (see Physics Constraint Component User Guide in Unreal Engine | Unreal Engine 5.3 Documentation) but there should be a way to implement this as you want it.

The other thing to consider is that collision hands are kinematic which means if you collide directly it may jitter when it’s trying to resolve impossible constraints (hand too deep into button/etc). So in order to build physics based UI I would recommend doing collision/overlap tests (i.e. change the button collision channel so the hand would normally overlap and not collide with it) and then build a basic restrained button manually. It will give you much finer control. See leap motion’s blog entry on widgets for guidance on how they did it.

Down the line I want to provide some UI widgets myself, but I’m not there yet and can’t guarantee that it would be ready before the jam ends.