Download

Scaling tracked motion controller movements

Hello, I’m working on a boxing type game for HTC Vive, and want to make a super-reach punch mode. I can’t seem to find any way to scale up the input movement tracking to achieve this effect. Any tips would be greatly appreciated!

Thanks in advance!

I did this when I was prototyping a Vive game with Hydra. Basically subtract the controller position from the chaperone origin (should just be the pawn origin unless you are doing something funky), multiply it by a scalar, then add it back.

For your specific punching thing you would want to subtract the position from controller to the headset instead of to tracking origin. Maybe even 15cm below the headset in order to have the scaling centered more from shoulder height. The new camera code in 4.11 will let you get the headset position much more easily than in the past.

You won’t change the motion controller components themselves, but instead drive a different component with the data on every tick. When you are done with a super punch, you will want to toggle back to displaying the gloves on the motion controller components, because they are updated with less latency than a surrogate component will be.

Appreciate the help!