Weekly Update Nov 12, 2017 hand controllers, sticky targets, and ambisonics
This week I added a hand controller to the scanners game as well as something I'm calling "sticky targeting" which is a more organic feeling mechanic. Check it out:
Hand Controls:
The first major accomplishment was adding hand controls. I was able to separate the head-exploding scanning ability which is controlled by gaze direction, and the telekinetic grabbing, pulling, and throwing ability which is now controlled by the hand controller. One challenge was that with Oculus Touch controllers (I'm using the OpenVR SDK by the way) you can't just use the transform.forward vector to line up a target. By trial and error I wound up rotating the forward vector by 45 degrees in the x axis and 4 degrees in the y-axis. Here's a small clip of the c-sharp code:
Vector3 newDirection = rightControllerGO.transform.forward;
newDirection = Vector3.RotateTowards(newDirection,rightControllerGO.transform.up,-45f/180f*Mathf.PI,1);
newDirection = Vector3.RotateTowards(newDirection,rightControllerGO.transform.right,-4f/180f*Mathf.PI,1);
I think this was a hacky way to approach the angles. What I should have done is parent a raycasting object under the rightController object and then rotate that only once. Then I could fire rays from that object and avoid the vector rotations during every update or fixedUpdate.
Sticky Targets:
The second major accomplishment is something I'm calling "sticky targeting" which maintains the same target even when the gaze or forward hand vector drifts away from a target. This was a pretty complicated setup but had huge rewards. Using the hand controller with this setup now feels as if you are pulling on an object with giant rubber bands. It feels pretty organic. And gaze-based scanning feels better when you don't have to maintain perfect targeting. It feels less mechanical and more organic. It's also less of a pain in the neck ;)
Ambisonics:
I spent a great deal of time this week researching ambisonics. As a sound designer and musician I'm interested in producing 3d audio. While researching I tinkered with FMOD and attempted to use Oculus Spatializer and Ambix plugins with Digital Performer but so far things aren't working out. I'll keep pursuing it. In the meantime, I was successful in using an ambisonic background audio file that I downloaded from Oculus. It's subtle but I think it's pretty effective.
What I'm watching:
I tried to watch #FinishFriday LIVE - The Completion Of Ocean Raiders! but it's a 9+ hour stream so I'll need to check it out during the week. It is definitely of major interest to me. It is a personal goal of mine to take a project from start to finish and release it to the public as fast as possible. In this 10-ish hour stream, Tim Ruswick develops a 2d game from scratch and publishes it. Crazy! I need to do that!
What I'm playing:
This week I started getting back into Robo-Recall. I'm really starting to get into it. It's pretty difficult in my opinion. I got stuck at the level where you need to throw bots into a vortex. Yeah, I'm still at the beginning ;). It took me a while to get the hang of the mechanics but it's a lot of fun. The main thing I'm having an issue with is figuring out my orientation after teleporting to a new location. And on a real technical note, I really hate that every time you pop out into the steamvr or oculus home interface, robo recall complains that you need to set focus to the game which means taking off the headset to click the mouse. Otherwise it's the best looking and best sounding game that I've played in VR and the mechanics are pretty sweet.
Comments
Post a Comment