Oculus Go FPS Setup

nixMWGD

New member
UFPS + FinalIK modified to apply movement/rotation from the spring system to the hand holding the gun. It is also modified based on the controller rotation and then applied to both hands with FinalIK, allowing for the gun itself to be moved by the spring system and the controller while the arms remain attached to the camera/head, giving a much more immersive look/feel. Tilting your head further adjusts the hand with IK to bring the weapon's sights up to the camera for a natural-feeling aim down sights feature rather than a button press (on a very limited controller). I plan to use this for a couple of Oculus Go shooters and improving on it, eventually using the system for non-VR FPS games.

The Oculus Go is a 3DOF system, only tracking rotation for the headset and one controller, no position tracking. My goal here is to use IK to make it feel as close to 6DOF games as I can, so even though there is only one controller giving input you will see both hands responding to it and the player can tilt their head to look down the sights of their weapon.

Inspiration for it is taken heavily from Battlefield 1 which also uses IK on it's first person models. This can be seen when jumping over things, looking all the way up or all the way down, etc., the gun rotation/position is modified but it looks like it is IK applied to the base animations.

 
Thanks!

I'm using AimIK to point the weapon based on the controller rotation using the FirePoint and a LimbIK on each arm. I modified FirstPersonPerspectiveItem so I could apply the position/rotation from the offset and the springs to the right hand IK target in its local space, and I use the left hand LimbIK to move the left hand back to where it needs to be relative to the right hand based on where it was before the IK was updated.

For aiming I modified FirstPersonShootableWeaponProperties to have an AimPoint GameObject that represents where the camera needs to be in relation to the gun for aiming down sights. When aiming (head tilt or right mouse button) it applies an offset to the right arm IK target after everything else is applied that moves the weapon so the AimPoint is where the camera is (or right eye cam for VR, left handed isn't supported yet). This way aiming is very quick to set up - just add a gameobject to the sights and then move it back however far forward the gun should be.

Reload animations animate the weight of the AimIK so when the animation plays the weight is zero, allowing the gun to move freely. As the weight goes to zero another value goes to 1 that allows the entire weapon setup to move based on the controller rotation, though that is a temporary solution as the arms no longer move by IK.

I've been developing this with non-VR in mind too and currently have it set up that it switches to standard PC controls when no headset is detected. As I mentioned in the first post I really enjoy the first person IK setup of Battlefield 1 (Battlefront 2 does this as well), so I'm setting this up so when I eventually move away from the Go I'll have a very nice setup for desktop/console.
 
Top