Making a Boom Blox style motion controller game w/Hydra. Help with rotation bug (video+blueprints)

I’m working on a block stacking puzzle game that’s similar to Boom Blox, but I’ve been stuck for a while on a weird rotation bug. I’m using a Razer Hydra and getnamo’s excellent Hydra plugin. My current setup uses a motion controller and a monitor, but I’m planning to fork it to work with the Vive once I get one. I think this might be the right forum to post this in.

First, let me give a quick rundown of the setup:

The camera pivots around a stack of blocks on a spring arm system that’s based off the 3rd person templet. You can also zoom the FoV in and out as well as pan up and down the stack. The “grabbing hand” is motion controlled by the hydra, but its central base coordinate is relative to a point on a spring arm in front of the camera. As you camera pivots around the tower, the Hydra’s base coordinate stays in front of your perspective. I’ve been able to get this system working nicely, and I made a demo to show it:

https://youtu.be/pvMyJCk5rsI?t=64
Unfortunately, there is a weird bug that I was trying to hide it in that video. Let’s say I grab a block with my hydra and I want to tilt the far side upwards… If I tilt my hydra up, I would expect to see the far side of the block tilt up in a corresponding fashion, but it that doesn’t always happen that way. Sometimes the wrong part of the block begins to tilt up and my brain starts to overheat as I try to figure out how my real world hand rotation affects the in-game block rotation. Here’s a video of the problem in action:

https://www.youtube.com/watch?v=6DImCdw3Bno

As you can see, it doesn’t actually matter what angle I’m looking at the block from. When I grab a block, its orientation in relation to the hydra will be determined by that block’s rotational yaw at the moment I grab it. I need to get the block’s orientation to always correspond with my orientation, and I think that means the following:

I think that means:

  • hydra yaw (world)
  • actor yaw(world)

Anyhow, I’ve spent about 10 hours trying to figure out how to do this, but the closest I got was to make the block spin to match my orientation when I grab it and that’s no good because it knocks stuff over.

I’m trying to get this going as a project for the VR development club I started at my college, but there’s no point getting other people working on other stuff when I can’t even get the basic motion controller and camera system working. Any help would be greatly appreciated!

Here are my blueprints: http://imgur.com/a/bWAZe