Grab and trigger Ping Pong Guns w/o hand controllers


#1

Just fooling around with using the mouse and keyboard to emulate Hydra/Vive grabbing – an initial prototype can be loaded as an Interface script from: http://cdn.xoigo.com/hifi/paragrab.min.js

The following controls are then enabled:

  • Middle Mouse double-click (on an “equippable” Entity) to automatically pick it up.

  • SPACE to simulate a trigger press.

  • ESC to drop the Entity.


Attachment is hard-coded to the LeftHand right now and rough approximations are used for the “held” joint rotations.

This approach is very experimental and specifically avoids making any changes to the existing Ping Pong Gun code. This seems to work OK with both PPGs found laying around the interdomains and also freshly-rezzed ones using the stock tutorials/createPingPongGun.js.

As part of testing another idea the script can also cause the gun to fire six colored projectiles at once in a neat circular configuration – just hold down SHIFT key when triggering with SPACE.


Random Picture Thread
HUD Toolbar missing
#2

this is really cool! Nice work!!!


#3

The script is not working for me and it’s a mess to read so I can’t make heads or tails out of it. Any chance of cleaning it up and taking a look at it again?


#4

Yeah, it doesn’t seem to work anymore for me either. Interface’s current grab/equip system indicates its own overhaul at some point, so I wasn’t planning to revisit this approach until after that dust settles.

Even before minification the needed hack-arounds are something of a mess to keep track of / test, but I can put the original code up on github later this week if you want to have a look.

Do you think many people are interested in Desktop modes of operation now? (six months ago seemed like only very few)


#5

I just have a general curiosity and a spontaneous spirit, so if the code is available I might just take a look at it, but I can’t promise I’ll make something out of it :slight_smile:

I’m sure there is an audience for desktop mode right now as it’s released on steam, but I’m not sure they are gonna stay at the moment unless they see what’s ahead and, like most here, want to “prepare”. If it plays a little bit more like one would expect with a controller or k/b then maybe they will even enjoy messing around in it regardless of the VR-potential.

I wrote a remap for the 360 controller too, so that you can actually use it to move and look around without an HMD. Will try and upload that as well.

Update: Just in case there is interest, my remap script is now here.


#6

Messing with the code it appears to still work when it parents to any joint but the left or right hand joint.