Commit c7509868 authored by Alex Peake's avatar Alex Peake

VRTK input stops when you're not holding the movement modifier key down so you...

VRTK input stops when you're not holding the movement modifier key down so you can type into the browser
parent 15a08bca
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: Ground Plane Material
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
m_ShaderKeywords:
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailAlbedoMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OcclusionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ParallaxMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _BumpScale: 1
- _Cutoff: 0.5
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _GlossMapScale: 1
- _Glossiness: 0.5
- _GlossyReflections: 1
- _Metallic: 0
- _Mode: 0
- _OcclusionStrength: 1
- _Parallax: 0.02
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _UVSec: 0
- _ZWrite: 1
m_Colors:
- _Color: {r: 0.46323532, g: 0.46323532, b: 0.46323532, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
fileFormatVersion: 2
guid: 089b30027e9e92e49b90d28f2ddea8f4
timeCreated: 1509931626
licenseType: Free
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:
......@@ -380,22 +380,25 @@ namespace VRTK
private void UpdatePosition()
{
float moveMod = Time.deltaTime * playerMoveMultiplier * sprintMultiplier;
if (Input.GetKey(moveForward))
if (mouseMovementInput == MouseInputMode.Always || (mouseMovementInput == MouseInputMode.RequiresButtonPress && Cursor.lockState == CursorLockMode.Locked))
{
transform.Translate(transform.forward * moveMod, Space.World);
}
else if (Input.GetKey(moveBackward))
{
transform.Translate(-transform.forward * moveMod, Space.World);
}
if (Input.GetKey(moveLeft))
{
transform.Translate(-transform.right * moveMod, Space.World);
}
else if (Input.GetKey(moveRight))
{
transform.Translate(transform.right * moveMod, Space.World);
float moveMod = Time.deltaTime * playerMoveMultiplier * sprintMultiplier;
if (Input.GetKey(moveForward))
{
transform.Translate(transform.forward * moveMod, Space.World);
}
else if (Input.GetKey(moveBackward))
{
transform.Translate(-transform.forward * moveMod, Space.World);
}
if (Input.GetKey(moveLeft))
{
transform.Translate(-transform.right * moveMod, Space.World);
}
else if (Input.GetKey(moveRight))
{
transform.Translate(transform.right * moveMod, Space.World);
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment