cancel
Showing results for 
Search instead for 
Did you mean: 

Simple experiments with gamepad controls and VR

mrgreen72
Superstar
I thought I'd share some of the small experiments I'm making with gamepad controls. This is a WIP and nothing ground breaking or very exciting but it's I thought it would be as good a starting point as any for a discussion/collaboration on VR and gamepad controls.

*NEW UPDATE 2014-04-27*

This is based on SDK 0.2.5.

Ugly paste of the description from the readme file:

Simple experiments with VR and gamepad controls by Hugo Tremblay aka Mr.Green.

This has been made using the 360 controller on Windows.


*Press the Back button of the 360 controller to see the control options*

1 - Control Modes

You can cycle through the different control modes by using the left and right
D-Pad buttons of the 360 controller or the + and - keys of the keypad.


1.1 - OculusSDK

This is the default mode of the Oculus SDK. You walk in the direction you're
looking at.

Left analog stick: Walk forward/backward. Strafe left/right.
Right analog stick: Turn left/right.
Left analog click: 180° turn.
Left trigger: Run.

1.2 - FreeHead

This mode lets you look and walk in different directions.

Left analog stick: Walk forward/backward. Strafe left/right.
Right analog stick: Turn left/right.
Left analog click: 180° turn.
Left trigger: Run.

1.3 - FreeHeadLS

This mode is like the FreeHead mode with strafing and turning swapped to give full
control to the left stick.

Left analog stick: Walk forward/backward. Turn left/right.
Right analog stick: Strafe left/right.
Left analog click: 180° turn.
Left trigger: Run.

1.4 - HeadStick

This mode lets you turn with your head when you're moving (walking or strafing).

When you turn your head past a configurable angle (default 20°) to either the
left or right, you beging turning at a configurable senstivity, much like an analog
stick.

You can freely look around normally when not moving.

Also, it assumes that if you're looking up 15° or more, you're probably looking
at something and will NOT turn.

This mode is requires good VR legs.

Left analog stick: Walk forward/backward. Strafe left/right.
Right analog stick: Free.
Left analog click: 180° turn.
Left trigger: Run.

1.5 - FixedAngle

This mode is probably very similar to what CloudHead's VR Comfort Mode. You
walk in the direction you're looking at but you can make broader turns using
the left stick, which turns in fixed increments (default 20°). The angle is
configurable.

Left analog stick: Walk forward/backward. Strafe left/right.
Right analog stick: Turn left/right in fixed increments.
Left analog click: 180° turn.
Left trigger: Run.

1.6 - FixedAngleLS

This mode is identical to the FixedAngle mode except that it gives you full control
with the left stick and puts strafing on the right stick.

The strafing could be put as a button modifier or removed altogether, which would
leave the right stick free for a potentialy more useful role like a free gun aiming
mode for instance.

Left analog stick: Walk forward/backward. Turn left/right in fixed increments.
Right analog stick: Strafe left/right.
Left analog click: 180° turn.
Left trigger: Run.

1.7 - FixedAngleHead

This mode is a mix of FixedAngle and HeadStick.

When you turn your head past a configurable angle (default 20°) to either the
left or right, you will turn in that direction by that angle.

Left analog stick: Walk forward/backward. Strafe left/right.
Right analog stick: Free.
Left analog click: 180° turn.
Left trigger: Run.

1.8 - TurnButton

This mode lets the user set his orientation (walking direction) to where he's
looking at with the press of a button. Initiates a rotation by the delta
between the camera orientation and the "body" orientation. Both the camera and
the body rotate by the same angle, which lets the user recenter his head and have
the new orientation facing forward.

Kinda hard to explain, try it for yourself!

Left analog stick: Walk forward/backward. Strafe left/right.
Right analog stick: Turn left/right.
Left analog click: The Turn Button.
Left trigger: Run.


1.9 - TECHNOLUST

This mode has been demanded by Anticleric over at the Oculus forums for his game
TECHNOLUST.

It's meant as a very simple mode for newcomers. It lets you walk forward simply
by pressing the left bumper or X and goes in the direction you look at. Holding the
right trigger lets you look around freely when walking, and turns you to the
direction you're looking at when you release it.

It also has the FixedAngle functions on the analog sticks.

Left analog stick: Walk forward/backward. Strafe left/right.
Right analog stick: Turn left/right in 45° increments.
Left analog click: 180° turn.
Left trigger: Run.
Left bumper/X: Walk backward.
Right bumper/Y: Walk forward.
Right trigger press: Independent walking/looking directions.
Right trigger release: Sets the walking direction to the looking direction.


2 - Options

2.1 - "Blink" turning

Experimental function to alleviate discomfort while turning with a gamepad.

On [default]: The image goes dark while turning. Simulates the user blinking his eyes.
There's a "deadzone" which lets the user make very slight adjustments
without blinking.
Off [stock OVR SDK]: No change in the camera behavior while turning.

You can toggle this feature by pressing the right analog stick button on the 360
controller or by pressing CapsLock on the keyboard.

2.2 - Turn angle

Specifies by how many degrees fixed angle modes will turn.

For head controlled modes, this is also the angle you need to turn your head
to start turning.

Default is 20°. A minimum of 30° is recommended for the FixedAngleHead mode.

Home: Increases turn angle
End: Decreases turn angle.

2.3 - Smooth Turns

This applies to the automatic turning initiated by multiple functions: (Fixed angle
turns, 180° turns, Turn Button).

You can activate smooth turns if instant changes in the point of view when
turning are disorienting to you. Could cause motion sickness though.

On: The camera rotation is fast but perceptible.
Off [default]: Instant point of view change.

B button or ScrollLock: Toggle Smooth Turns.

2.4 - Turn speed

When using Smooth turns, sets the speed of the rotation in degrees/s

PageUp: Increases turn speed
PageDown: Decreases turn speed.

2.5 - Sensitivity

Analog stick and Head turning sensitivity (HeadStick mode).

PageUp: Increases turn speed
PageDown: Decreases turn speed.



Modified Tuscany demo - Windows - 64 bit

Unity package of the modified OVRPlayerController prefab - SDK 0.2.5
68 REPLIES 68

Anticleric
Expert Protege
Thank you for this!
Works like a charm. I'm just using the independent head movement, but I will experiment with the others as well.
Thanks again!

grodenglaive
Honored Guest
the turn button is a good idea for stand-up rifting

drash
Heroic Explorer
I very much enjoyed walking around taking in the scenery using only my left hand on a wireless gamepad, so here's a video.




Thank you :mrgreen: !

I had another thought while I was in there and am wondering what you think of it: What if the left trigger was not used for "sprint", but for the actual walk-forward speed? The left stick would then simply be for turning, and this would possibly make it easier for beginners to control where they are going because it can be easy to move forward and accidentally jiggle the left stick and make the virtual player turn. The other benefit of this might be that in both "independent look" and "walk where you look" modes, it would make more sense that you have a single control to make walking "happen" rather than trying to reconcile the directional-ness of the thumbstick with your in-game direction.

Anticleric
Expert Protege
"drash" wrote:
I

I had another thought while I was in there and am wondering what you think of it: What if the left trigger was not used for "sprint", but for the actual walk-forward speed? The left stick would then simply be for turning, and this would possibly make it easier for beginners to control where they are going because it can be easy to move forward and accidentally jiggle the left stick and make the virtual player turn. The other benefit of this might be that in both "independent look" and "walk where you look" modes, it would make more sense that you have a single control to make walking "happen" rather than trying to reconcile the directional-ness of the thumbstick with your in-game direction.


I love this idea Drash. This is exactly the kind of thing I'm trying to integrate. For example in Technolust I was using the right mouse button to move the player forward (which I think works really well). Now I'm working on Xbox controller and trying to make a nice easy user friendly control scheme.

Ideally I would like to have left trigger be like a throttle for walk and have them hold the right trigger to allow "independent look". Letting go of the right trigger would reset the body to the gaze direction eliminating the need to reset the camera orientation. This is less disorienting than jumping the camera view also.

Sadly I'm not a very good programmer and this is beyond me. I may have to wait for Technolust's kickstarter to come through and hire someone.

mrgreen72
Superstar
"drash" wrote:
I very much enjoyed walking around taking in the scenery using only my left hand on a wireless gamepad, so here's a video.

Thank you :mrgreen: !

:lol: No, thank you! This is pretty amazing!

"drash" wrote:

I had another thought while I was in there and am wondering what you think of it: What if the left trigger was not used for "sprint", but for the actual walk-forward speed? The left stick would then simply be for turning, and this would possibly make it easier for beginners to control where they are going because it can be easy to move forward and accidentally jiggle the left stick and make the virtual player turn. The other benefit of this might be that in both "independent look" and "walk where you look" modes, it would make more sense that you have a single control to make walking "happen" rather than trying to reconcile the directional-ness of the thumbstick with your in-game direction.


This is exactly the kind of discussion I hoped to trigger with this. Awesome! 🙂

It would be a hard-sell to gamers with years of WASD and left stick experience but a simple throttle might indeed be easier for newcomers. How do you walk backwards though? Not that we walk backwards (or strafe) all that much in real life though...

Actually, this is funny because when I started playing first person shooters back in the Wolf 3D days I had walk-forward on my right mouse button. Not sure I even used "ASD". :lol:

mrgreen72
Superstar
"Anticleric" wrote:
"drash" wrote:
I

I had another thought while I was in there and am wondering what you think of it: What if the left trigger was not used for "sprint", but for the actual walk-forward speed? The left stick would then simply be for turning, and this would possibly make it easier for beginners to control where they are going because it can be easy to move forward and accidentally jiggle the left stick and make the virtual player turn. The other benefit of this might be that in both "independent look" and "walk where you look" modes, it would make more sense that you have a single control to make walking "happen" rather than trying to reconcile the directional-ness of the thumbstick with your in-game direction.


I love this idea Drash. This is exactly the kind of thing I'm trying to integrate. For example in Technolust I was using the right mouse button to move the player forward (which I think works really well). Now I'm working on Xbox controller and trying to make a nice easy user friendly control scheme.

Ideally I would like to have left trigger be like a throttle for walk and have them hold the right trigger to allow "independent look". Letting go of the right trigger would reset the body to the gaze direction eliminating the need to reset the camera orientation. This is less disorienting than jumping the camera view also.

Sadly I'm not a very good programmer and this is beyond me. I may have to wait for Technolust's kickstarter to come through and hire someone.


So let's see if I got this:

- left trigger is basically a gas pedal.
- you walk in the direction you're looking at by default.
- pressing the right trigger lets you look around without affecting your walking direction
- when you release the right trigger, it rotates your body to face the direction you're looking at. Like my "turn button" does.

I'm not sold on that control scheme but I'd be happy to help you with that anyway. For free! :lol:

I'd very much love to contribute on an exciting VR project but there's no way in hell I have the skills, time or energy to make something like you did by myself. I'm no John Carmack, or even close, but I write better code than the average monkey and working on a game is more fun than the Java web crap I do all day long. :lol:

Nah, I actually do like what I do for a living a lot, but you know what I mean. 🙂

I've done extensive modding for Quake 1, 2, 3 and Soldier of Fortune 2 but I haven't touched games coding since and I kinda miss it! 🙂

Anticleric
Expert Protege
"mrgreen72" wrote:
"Anticleric" wrote:
"drash" wrote:
I

I had another thought while I was in there and am wondering what you think of it: What if the left trigger was not used for "sprint", but for the actual walk-forward speed? The left stick would then simply be for turning, and this would possibly make it easier for beginners to control where they are going because it can be easy to move forward and accidentally jiggle the left stick and make the virtual player turn. The other benefit of this might be that in both "independent look" and "walk where you look" modes, it would make more sense that you have a single control to make walking "happen" rather than trying to reconcile the directional-ness of the thumbstick with your in-game direction.


I love this idea Drash. This is exactly the kind of thing I'm trying to integrate. For example in Technolust I was using the right mouse button to move the player forward (which I think works really well). Now I'm working on Xbox controller and trying to make a nice easy user friendly control scheme.

Ideally I would like to have left trigger be like a throttle for walk and have them hold the right trigger to allow "independent look". Letting go of the right trigger would reset the body to the gaze direction eliminating the need to reset the camera orientation. This is less disorienting than jumping the camera view also.

Sadly I'm not a very good programmer and this is beyond me. I may have to wait for Technolust's kickstarter to come through and hire someone.


So let's see if I got this:

- left trigger is basically a gas pedal.
- you walk in the direction you're looking at by default.
- pressing the right trigger lets you look around without affecting your walking direction
- when you release the right trigger, it rotates your body to face the direction you're looking at. Like my "turn button" does.

I'm not sold on the idea but I'd be happy to help you with that. For free! :lol:

I'd very much love to contribute on an exciting VR project but there's no way in hell I have the skills, time or energy to make something like you did by myself. I'm no John Carmack, or even close, but I write better code than the average monkey and working on a game is more fun than the Java web crap I do all day long. :lol:

Nah, I actually do like what I do for a living a lot, but you know what I mean. 🙂

I've done extensive modding for Quake 1, 2, 3 and Soldier of Fortune 2 but I haven't touched games coding since and I kinda miss it! 🙂


Yep. That's exactly what I want to try out. haha. Was actually offering a $20 reward to the first person that gives me a simple cut and paste of this into the unity SDK when you posted this.

I will give you a credit for it if I use it. I really think this is a winning control scheme (maybe with some slight experimentation).

We're not shooting for the hard-cores here. Of course we leave WASD controls in-tact, but we need to make things as easy, accessible and comfortable as possible for everyone else. I want my granny to be able to play Technolust. 😛

mrgreen72
Superstar
Update 2014-04-22

New version up with the control mode you asked for Anticleric, as well as another new control mode and various tweaks.

See the updated OP.

Anticleric
Expert Protege
"mrgreen72" wrote:
Update 2014-04-22

New version up with the control mode you asked for Anticleric, as well as another new control mode and various tweaks.

See the updated OP.


Amazing! Can't wait to try it. Thanks so much Mr. Green 😉