Skip to content

Commit

Permalink
Working slider and some tidy ups
Browse files Browse the repository at this point in the history
  • Loading branch information
andybak committed Oct 27, 2024
1 parent 566124d commit 8272cdd
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 257 deletions.
15 changes: 0 additions & 15 deletions Assets/Prefabs/CameraRig.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -75335,26 +75335,11 @@ PrefabInstance:
serializedVersion: 3
m_TransformParent: {fileID: 4657463438926638}
m_Modifications:
- target: {fileID: 2308004412086282393, guid: 9d12e6c8a14b7a24e8ffc926ed203565,
type: 3}
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
- target: {fileID: 3896392404863120199, guid: 9d12e6c8a14b7a24e8ffc926ed203565,
type: 3}
propertyPath: m_Allowed
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3930944731616475599, guid: 9d12e6c8a14b7a24e8ffc926ed203565,
type: 3}
propertyPath: m_Name
value: Tool Options Panels
objectReference: {fileID: 0}
- target: {fileID: 4624124601864769699, guid: 9d12e6c8a14b7a24e8ffc926ed203565,
type: 3}
propertyPath: m_Allowed
value: 1
objectReference: {fileID: 0}
- target: {fileID: 5387130165687297604, guid: 9d12e6c8a14b7a24e8ffc926ed203565,
type: 3}
propertyPath: m_LocalPosition.x
Expand Down
2 changes: 1 addition & 1 deletion Assets/Prefabs/Slider.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ MonoBehaviour:
m_SliderRenderer: {fileID: 6551581032341960475}
m_Minimum: 0
m_Maximum: 1
m_Step: 0.1
m_Step: 0.01
m_UpdateInterval: 1
m_UpdateOnlyOnRelease: 0
--- !u!1 &2722577641726268315
Expand Down
2 changes: 1 addition & 1 deletion Assets/Prefabs/Tool Options Panel.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
m_IsActive: 0
--- !u!4 &1338206105780383609
Transform:
m_ObjectHideFlags: 0
Expand Down
5 changes: 0 additions & 5 deletions Assets/Prefabs/Tool Options Panels.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -325,11 +325,6 @@ PrefabInstance:
propertyPath: m_Name
value: Options_InsertVolume
objectReference: {fileID: 0}
- target: {fileID: 1091944798805812783, guid: a29b63e4d35688042aadc575023c769f,
type: 3}
propertyPath: m_IsActive
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1338206105780383609, guid: a29b63e4d35688042aadc575023c769f,
type: 3}
propertyPath: m_LocalPosition.x
Expand Down
242 changes: 9 additions & 233 deletions Assets/Scenes/MainScene.unity
Original file line number Diff line number Diff line change
Expand Up @@ -1278,46 +1278,6 @@ MonoBehaviour:
m_hasFontAssetChanged: 0
m_renderer: {fileID: 314171967}
m_maskType: 0
--- !u!21 &317438119
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Sprites/Default
m_Shader: {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 5
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _AlphaTex:
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}
m_Ints: []
m_Floats:
- PixelSnap: 0
- _EnableExternalAlpha: 0
m_Colors:
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _Flip: {r: 1, g: 1, b: 1, a: 1}
- _RendererColor: {r: 1, g: 1, b: 1, a: 1}
m_BuildTextureStacks: []
--- !u!1 &321371327
GameObject:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -4240,171 +4200,6 @@ MonoBehaviour:
transitionLength: 1
nightEnvironment: {fileID: 178552382}
dayEnvironment: {fileID: 1574380179}
--- !u!43 &902719824
Mesh:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name:
serializedVersion: 11
m_SubMeshes:
- serializedVersion: 2
firstByte: 0
indexCount: 24
topology: 0
baseVertex: 0
firstVertex: 0
vertexCount: 8
localAABB:
m_Center: {x: 0, y: 0.01, z: 0}
m_Extent: {x: 1.65, y: 0, z: 1.275}
m_Shapes:
vertices: []
shapes: []
channels: []
fullWeights: []
m_BindPose: []
m_BoneNameHashes:
m_RootBoneNameHash: 0
m_BonesAABB: []
m_VariableBoneCountWeights:
m_Data:
m_MeshCompression: 0
m_IsReadable: 1
m_KeepVertices: 1
m_KeepIndices: 1
m_IndexFormat: 0
m_IndexBuffer: 000004000100010004000500010005000200020005000600020006000300030006000700030007000000000007000400
m_VertexData:
serializedVersion: 3
m_VertexCount: 8
m_Channels:
- stream: 0
offset: 0
format: 0
dimension: 3
- stream: 0
offset: 0
format: 0
dimension: 0
- stream: 0
offset: 0
format: 0
dimension: 0
- stream: 0
offset: 12
format: 0
dimension: 4
- stream: 0
offset: 28
format: 0
dimension: 2
- stream: 0
offset: 0
format: 0
dimension: 0
- stream: 0
offset: 0
format: 0
dimension: 0
- stream: 0
offset: 0
format: 0
dimension: 0
- stream: 0
offset: 0
format: 0
dimension: 0
- stream: 0
offset: 0
format: 0
dimension: 0
- stream: 0
offset: 0
format: 0
dimension: 0
- stream: 0
offset: 0
format: 0
dimension: 0
- stream: 0
offset: 0
format: 0
dimension: 0
- stream: 0
offset: 0
format: 0
dimension: 0
m_DataSize: 288
_typelessdata: 0000c03f0ad7233c0000903f000000000000803f0000803f0000803f00000000000000000000c03f0ad7233c000090bf000000000000803f0000803f0000803f0000803f000000000000c0bf0ad7233c000090bf000000000000803f0000803f0000803f00000000000000000000c0bf0ad7233c0000903f000000000000803f0000803f0000803f0000803f000000003333d33f0ad7233c3333a33f000000000000803f0000803f00000000000000000000803f3333d33f0ad7233c3333a3bf000000000000803f0000803f000000000000803f0000803f3333d3bf0ad7233c3333a3bf000000000000803f0000803f00000000000000000000803f3333d3bf0ad7233c3333a33f000000000000803f0000803f000000000000803f0000803f
m_CompressedMesh:
m_Vertices:
m_NumItems: 0
m_Range: 0
m_Start: 0
m_Data:
m_BitSize: 0
m_UV:
m_NumItems: 0
m_Range: 0
m_Start: 0
m_Data:
m_BitSize: 0
m_Normals:
m_NumItems: 0
m_Range: 0
m_Start: 0
m_Data:
m_BitSize: 0
m_Tangents:
m_NumItems: 0
m_Range: 0
m_Start: 0
m_Data:
m_BitSize: 0
m_Weights:
m_NumItems: 0
m_Data:
m_BitSize: 0
m_NormalSigns:
m_NumItems: 0
m_Data:
m_BitSize: 0
m_TangentSigns:
m_NumItems: 0
m_Data:
m_BitSize: 0
m_FloatColors:
m_NumItems: 0
m_Range: 0
m_Start: 0
m_Data:
m_BitSize: 0
m_BoneIndices:
m_NumItems: 0
m_Data:
m_BitSize: 0
m_Triangles:
m_NumItems: 0
m_Data:
m_BitSize: 0
m_UVInfo: 0
m_LocalAABB:
m_Center: {x: 0, y: 0.01, z: 0}
m_Extent: {x: 1.65, y: 0, z: 1.275}
m_MeshUsageFlags: 0
m_CookingOptions: 30
m_BakedConvexCollisionMesh:
m_BakedTriangleCollisionMesh:
m_MeshMetrics[0]: 1
m_MeshMetrics[1]: 1
m_MeshOptimizationFlags: -1
m_StreamData:
serializedVersion: 2
offset: 0
size: 0
path:
--- !u!1001 &911258151
PrefabInstance:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -5540,18 +5335,6 @@ Transform:
m_Children: []
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &1938676138 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 114947750195704150, guid: d4f35ac2c629f3b418e6b201480fea34,
type: 3}
m_PrefabInstance: {fileID: 389088758}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: ba92baa92cec0dd4ebbac0c97f40fc5f, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &2026859541
GameObject:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -5693,25 +5476,18 @@ PrefabInstance:
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 23914034357406722, guid: 789375d7cedc38f4bb55fa91d9a97de5,
type: 3}
propertyPath: m_Materials.Array.data[0]
value:
objectReference: {fileID: 317438119}
- target: {fileID: 33423680678514092, guid: 789375d7cedc38f4bb55fa91d9a97de5,
type: 3}
propertyPath: m_Mesh
value:
objectReference: {fileID: 902719824}
- target: {fileID: 114822395685491102, guid: 789375d7cedc38f4bb55fa91d9a97de5,
type: 3}
propertyPath: peltzerMain
value:
objectReference: {fileID: 1938676138}
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
m_AddedComponents: []
m_AddedComponents:
- targetCorrespondingSourceObject: {fileID: 2133677956401727410, guid: 789375d7cedc38f4bb55fa91d9a97de5,
type: 3}
insertIndex: -1
addedObject: {fileID: 0}
- targetCorrespondingSourceObject: {fileID: 339629575845349924, guid: 789375d7cedc38f4bb55fa91d9a97de5,
type: 3}
insertIndex: -1
addedObject: {fileID: 0}
m_SourcePrefab: {fileID: 100100000, guid: 789375d7cedc38f4bb55fa91d9a97de5, type: 3}
--- !u!1660057539 &9223372036854775807
SceneRoots:
Expand Down
4 changes: 2 additions & 2 deletions Assets/Scripts/model/controller/Slider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ private static float GetNormalizedLocalPosition(RaycastHit hit)
// Calculate the normalized positions (0 to 1)
var normalized = Mathf.InverseLerp(localMin.x, localMax.x, localHitPoint.x);
// Fudge factor because my maths is off somewhere
float fudge = 0.2f;
normalized = Mathf.InverseLerp(0 - fudge, 1 + fudge, normalized);
float fudge = 0.1f;
normalized = Mathf.InverseLerp(0 + fudge, 1 - fudge, normalized);
return normalized;
}

Expand Down

0 comments on commit 8272cdd

Please sign in to comment.