Skip to content

Commit

Permalink
[May] Adding rendered line pointers (#2150)
Browse files Browse the repository at this point in the history
* Porting PointerLine from Lars and integrating it into the current input system

* Refactoring out BasePointer

* Initial AttachToController/ControllerFinder refactoring

* Adding handedness to properly differentiate pointer rays

* Adding LineMaterial to prevent on-the-fly shader loading

* Updating InputSourcePointer visualization to reduce wobbliness

* Updating prefabs

* Cleaning up some scripts

* Minor build/bug fixes
  • Loading branch information
keveleigh authored and StephenHodgson committed May 23, 2018
1 parent 2d3a869 commit 83dd3ee
Show file tree
Hide file tree
Showing 22 changed files with 1,141 additions and 63 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,327 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1001 &100100000
Prefab:
m_ObjectHideFlags: 1
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications: []
m_RemovedComponents: []
m_ParentPrefab: {fileID: 0}
m_RootGameObject: {fileID: 1406990951443512}
m_IsPrefabParent: 1
--- !u!1 &1406990951443512
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 5
m_Component:
- component: {fileID: 4078510770057468}
- component: {fileID: 114475473728920830}
- component: {fileID: 114253695620597976}
- component: {fileID: 114337282513792584}
- component: {fileID: 114056157604016048}
m_Layer: 0
m_Name: LinearControllerPointerMultiColors
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &4078510770057468
Transform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1406990951443512}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &114056157604016048
MonoBehaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1406990951443512}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f9a4d6e2d0d55194788e9a2df9c0261f, type: 3}
m_Name:
m_EditorClassIdentifier:
source: {fileID: 114337282513792584}
LineColor:
serializedVersion: 2
key0: {r: 1, g: 1, b: 1, a: 1}
key1: {r: 1, g: 1, b: 1, a: 1}
key2: {r: 0, g: 0, b: 0, a: 0}
key3: {r: 0, g: 0, b: 0, a: 0}
key4: {r: 0, g: 0, b: 0, a: 0}
key5: {r: 0, g: 0, b: 0, a: 0}
key6: {r: 0, g: 0, b: 0, a: 0}
key7: {r: 0, g: 0, b: 0, a: 0}
ctime0: 0
ctime1: 65535
ctime2: 0
ctime3: 0
ctime4: 0
ctime5: 0
ctime6: 0
ctime7: 0
atime0: 0
atime1: 65535
atime2: 0
atime3: 0
atime4: 0
atime5: 0
atime6: 0
atime7: 0
m_Mode: 0
m_NumColorKeys: 2
m_NumAlphaKeys: 2
LineWidth:
serializedVersion: 2
m_Curve:
- serializedVersion: 2
time: 0
value: 0.05
inSlope: 0
outSlope: 0
tangentMode: 0
- serializedVersion: 2
time: 1
value: 0.05
inSlope: 0
outSlope: 0
tangentMode: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
WidthMultiplier: 0.1
ColorOffset: 0
WidthOffset: 0
RotationOffset: 0
StepMode: 0
NumLineSteps: 10
InterpolationMode: 1
StepLength: 0.05
MaxLineSteps: 2048
StepLengthCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 2
time: 0
value: 1
inSlope: 0
outSlope: -0.5
tangentMode: 0
- serializedVersion: 2
time: 1
value: 0.5
inSlope: -0.5
outSlope: 0
tangentMode: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
LineMaterial: {fileID: 2100000, guid: d9f5efc2f1dfc6846a9ebeac2f029eff, type: 2}
RoundedEdges: 1
RoundedCaps: 1
lineRenderer: {fileID: 0}
--- !u!114 &114253695620597976
MonoBehaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1406990951443512}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: df317dc594e50444da58008aa4ee1475, type: 3}
m_Name:
m_EditorClassIdentifier:
element: 6
handedness: 0
SetChildrenInactiveWhenDetached: 1
PositionOffset: {x: 0, y: 0, z: 0}
RotationOffset: {x: 0, y: 0, z: 0}
ScaleOffset: {x: 1, y: 1, z: 1}
SetScaleOnAttach: 0
CurrentPointerOrientation: 0
extentOverride: 2
RaycastOrigin: {fileID: 0}
LineColorSelected:
serializedVersion: 2
key0: {r: 0, g: 0.57254905, b: 0.57254905, a: 0}
key1: {r: 0, g: 0.35686275, b: 0.42745098, a: 1}
key2: {r: 0, g: 0.1882353, b: 0.3019608, a: 1}
key3: {r: 0, g: 0, b: 0, a: 0}
key4: {r: 0, g: 0, b: 0, a: 0}
key5: {r: 0, g: 0, b: 0, a: 0}
key6: {r: 0, g: 0, b: 0, a: 0}
key7: {r: 0, g: 0, b: 0, a: 0}
ctime0: 0
ctime1: 33751
ctime2: 65535
ctime3: 0
ctime4: 0
ctime5: 0
ctime6: 0
ctime7: 0
atime0: 0
atime1: 4981
atime2: 60554
atime3: 65535
atime4: 0
atime5: 0
atime6: 0
atime7: 0
m_Mode: 0
m_NumColorKeys: 3
m_NumAlphaKeys: 4
LineColorValid:
serializedVersion: 2
key0: {r: 0.06666667, g: 0.57254905, b: 0, a: 0}
key1: {r: 0, g: 0.42745098, b: 0.003921569, a: 1}
key2: {r: 0.011764706, g: 0.3019608, b: 0, a: 1}
key3: {r: 0, g: 0, b: 0, a: 0}
key4: {r: 0, g: 0, b: 0, a: 0}
key5: {r: 0, g: 0, b: 0, a: 0}
key6: {r: 0, g: 0, b: 0, a: 0}
key7: {r: 0, g: 0, b: 0, a: 0}
ctime0: 0
ctime1: 33751
ctime2: 65535
ctime3: 0
ctime4: 0
ctime5: 0
ctime6: 0
ctime7: 0
atime0: 0
atime1: 4981
atime2: 60554
atime3: 65535
atime4: 0
atime5: 0
atime6: 0
atime7: 0
m_Mode: 0
m_NumColorKeys: 3
m_NumAlphaKeys: 4
LineColorNoTarget:
serializedVersion: 2
key0: {r: 0.52156866, g: 0.52156866, b: 0.52156866, a: 0}
key1: {r: 0.32156864, g: 0.32156864, b: 0.32156864, a: 1}
key2: {r: 0.15294118, g: 0.15294118, b: 0.15294118, a: 1}
key3: {r: 0, g: 0, b: 0, a: 0}
key4: {r: 0, g: 0, b: 0, a: 0}
key5: {r: 0, g: 0, b: 0, a: 0}
key6: {r: 0, g: 0, b: 0, a: 0}
key7: {r: 0, g: 0, b: 0, a: 0}
ctime0: 0
ctime1: 33751
ctime2: 65535
ctime3: 0
ctime4: 0
ctime5: 0
ctime6: 0
ctime7: 0
atime0: 0
atime1: 4981
atime2: 60554
atime3: 65535
atime4: 0
atime5: 0
atime6: 0
atime7: 0
m_Mode: 0
m_NumColorKeys: 3
m_NumAlphaKeys: 4
LineCastResolution: 25
LineBase: {fileID: 0}
LineRenderers: []
--- !u!114 &114337282513792584
MonoBehaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1406990951443512}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: bec4b46028f8fb94c9b03b88fca37bd6, type: 3}
m_Name:
m_EditorClassIdentifier:
LineStartClamp: 0
LineEndClamp: 1
RotationType: 1
FlipUpVector: 0
OriginOffset: {x: 0, y: 0, z: 0}
ManualUpVectorBlend: 0
ManualUpVectors:
- {x: 0, y: 1, z: 0}
- {x: 0, y: 1, z: 0}
- {x: 0, y: 1, z: 0}
VelocitySearchRange: 0.02
VelocityBlend: 0.5
DistortionType: 0
DistortionStrength:
serializedVersion: 2
m_Curve:
- serializedVersion: 2
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
- serializedVersion: 2
time: 1
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
UniformDistortionStrength: 1
distorters: []
loops: 0
Start: {x: 0, y: 0, z: 0}
End: {x: 1, y: 1, z: 1}
--- !u!114 &114475473728920830
MonoBehaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1406990951443512}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 3be3fb966fbcc0f44add9a39d15cd3d0, type: 3}
m_Name:
m_EditorClassIdentifier:
distortOrder: 0
distortStrength: 1
LocalCenterOfGravity: {x: 0, y: 0, z: 0}
AxisStrength: {x: 1, y: 1, z: 1}
Radius: 0.5
GravityStrength:
serializedVersion: 2
m_Curve:
- serializedVersion: 2
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
- serializedVersion: 2
time: 1
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 83dd3ee

Please sign in to comment.