Motion Controllers and Child Actor Components

I’m very new to UE4, have an opportunity to play around with a Vive devkit. Following the documentation I have the HMD working in a small test scene, and I got the motion controllers to work too, bringing a left and right one onto my Pawn. I then placed a static mesh of a basic gun model onto each motion controller in the Pawn blueprint, and that worked fine, suddenly I’m holding dual guns in VR! But now I’m thinking I want the guns to have there own blueprints, so I create a new blueprint, gun_blueprint, add my gun static mesh to it. Now my thinking is I just need to replace the static meshes in the VR_Pawn blueprint under the 2 motion controllers with child actor components that point to the gun_blueprint… but this isn’t working and I have no idea why? Anyone know what I’m doing wrong here?

I can’t tell what you’re doing wrong but I would SpawnActorfromClass (BP_Gun), and then use the AttachTo-function and parent it to the motioncontroller (or the mesh that resembles the controllers/hands). Make sure you are not simulating physics on BP_Gun.

You can also do a SphereTraceForObjects and if you find BP_Gun -> AttachTo. If you want to drop the weapon you use DetachActor. I’m packaging right now but let me know if you can’t figure it out and I’ll send you some screencaps.

Worked! :slight_smile: Thank you