Skip to content

Commit

Permalink
mirror update
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidGoedicke committed Apr 18, 2019
1 parent 65c5042 commit fcb83fa
Show file tree
Hide file tree
Showing 9 changed files with 107 additions and 22 deletions.
28 changes: 28 additions & 0 deletions Assets/BackMirrorAnchor.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class BackMirrorAnchor : MonoBehaviour {

public Transform CameraPos;
public Transform LowerTarget;
Vector3 InitalUpperPosition;
public float minIn; // min and max y CameraPos local position height
public float maxIn;

// Use this for initialization
void Start () {
InitalUpperPosition = transform.localPosition;

}

// Update is called once per frame
void Update () {
if (SceneStateManager.Instance.ActionState != ActionState.DRIVE)
{
float lerpValue = Mathf.Lerp(0, 1, ((CameraPos.localPosition.y - minIn) / (maxIn - minIn)));
; transform.localPosition = Vector3.Lerp(LowerTarget.localPosition, InitalUpperPosition, lerpValue);
Debug.Log(lerpValue);
}
}
}
11 changes: 11 additions & 0 deletions Assets/BackMirrorAnchor.cs.meta

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

Binary file modified Assets/Meshes/XE/Mirrors.fbx
Binary file not shown.
80 changes: 63 additions & 17 deletions Assets/Prefabs/XE_Rigged.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -2436,7 +2436,6 @@ Transform:
- {fileID: 4050675194620254}
- {fileID: 4945884919592592}
- {fileID: 4761535004510826}
- {fileID: 4541480518286528}
- {fileID: 4432124452030234}
m_Father: {fileID: 0}
m_RootOrder: 0
Expand Down Expand Up @@ -6200,6 +6199,21 @@ GameObject:
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!1 &1041940146904174
GameObject:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 6
m_Component:
- component: {fileID: 4068532366695228}
m_Layer: 0
m_Name: MirrorLowerTarget
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!1 &1047169499736000
GameObject:
m_ObjectHideFlags: 1
Expand Down Expand Up @@ -6503,7 +6517,7 @@ GameObject:
m_IsActive: 1
--- !u!1 &1227044271242400
GameObject:
m_ObjectHideFlags: 0
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 6
Expand Down Expand Up @@ -6767,6 +6781,7 @@ GameObject:
- component: {fileID: 4015133744475950}
- component: {fileID: 33635089437834450}
- component: {fileID: 23823502330737938}
- component: {fileID: 114540034469102190}
m_Layer: 0
m_Name: BackMirrorHolder
m_TagString: Untagged
Expand Down Expand Up @@ -7684,9 +7699,11 @@ Transform:
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1336821869942954}
m_LocalRotation: {x: -0.6937186, y: 0.13694727, z: 0.13694726, w: 0.69371855}
m_LocalPosition: {x: 0.5105276, y: 0.53337926, z: 0}
m_LocalPosition: {x: 0.423, y: 0.5779, z: 0.036}
m_LocalScale: {x: 3.361937, y: 4.3421774, z: 4.3421774}
m_Children: []
m_Children:
- {fileID: 4541480518286528}
- {fileID: 4205284165012840}
m_Father: {fileID: 4945884919592592}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
Expand Down Expand Up @@ -7805,6 +7822,19 @@ Transform:
m_Father: {fileID: 4050675194620254}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!4 &4068532366695228
Transform:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1041940146904174}
m_LocalRotation: {x: -0.7071068, y: 0, z: 0, w: 0.7071068}
m_LocalPosition: {x: 0.656, y: 0.477, z: 0.036}
m_LocalScale: {x: 3.3619385, y: 4.3421793, z: 4.3421783}
m_Children: []
m_Father: {fileID: 4945884919592592}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: -90.00001, y: 0, z: 0}
--- !u!4 &4071114678936140
Transform:
m_ObjectHideFlags: 1
Expand Down Expand Up @@ -7967,12 +7997,13 @@ Transform:
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1816534560324986}
m_LocalRotation: {x: 0.6937184, y: -0.13694762, z: -0.13694768, w: -0.6937187}
m_LocalPosition: {x: 0.51063, y: 0.5333784, z: 0.00007221}
m_LocalScale: {x: 3.361937, y: -4.3421774, z: 4.3421774}
m_LocalRotation: {x: -0.00000026822087, y: 0.000000104308114, z: -0.0000005513429,
w: -1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: -1, z: 1}
m_Children: []
m_Father: {fileID: 4945884919592592}
m_RootOrder: 0
m_Father: {fileID: 4015133744475950}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 270, y: 0, z: 22.334002}
--- !u!4 &4209998301786090
Transform:
Expand Down Expand Up @@ -8231,7 +8262,7 @@ Transform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 495970}
m_RootOrder: 17
m_RootOrder: 16
m_LocalEulerAnglesHint: {x: 0, y: 180, z: 90}
--- !u!4 &4463307008947054
Transform:
Expand Down Expand Up @@ -8348,12 +8379,12 @@ Transform:
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1227044271242400}
m_LocalRotation: {x: 0.7071068, y: 0.7071068, z: 0, w: 0}
m_LocalPosition: {x: -0.035, y: 1.135, z: 0.72}
m_LocalScale: {x: 1, y: 1, z: 1}
m_LocalRotation: {x: 0.13694724, y: 0.69371855, z: 0.1369473, w: -0.6937186}
m_LocalPosition: {x: 0.05412249, y: -0.019207451, z: -0.010570758}
m_LocalScale: {x: 0.23029935, y: 0.2399962, z: 0.2877509}
m_Children: []
m_Father: {fileID: 495970}
m_RootOrder: 16
m_Father: {fileID: 4015133744475950}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 180, z: 90}
--- !u!4 &4573144689089834
Transform:
Expand Down Expand Up @@ -8783,7 +8814,7 @@ Transform:
m_LocalPosition: {x: 0, y: 0.7, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 4205284165012840}
- {fileID: 4068532366695228}
- {fileID: 4015133744475950}
- {fileID: 4172202489935960}
- {fileID: 4463307008947054}
Expand Down Expand Up @@ -9041,7 +9072,7 @@ Camera:
height: 1
near clip plane: 0.31
far clip plane: 1000
field of view: 47
field of view: 43
orthographic: 0
orthographic size: 5
m_Depth: 0
Expand Down Expand Up @@ -11414,6 +11445,21 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 8bcd03e00992e084c8be61565d44b8bd, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!114 &114540034469102190
MonoBehaviour:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1336821869942954}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 20e324be72a329e40ab591ca27d3abd7, type: 3}
m_Name:
m_EditorClassIdentifier:
CameraPos: {fileID: 4056613939988268}
LowerTarget: {fileID: 4068532366695228}
minIn: 1.3
maxIn: 1.59
--- !u!114 &114543381008477912
MonoBehaviour:
m_ObjectHideFlags: 1
Expand Down
2 changes: 1 addition & 1 deletion Assets/Textures/CenterMirror.renderTexture
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ RenderTexture:
Hash: 00000000000000000000000000000000
m_ForcedFallbackFormat: 4
m_DownscaleFallback: 0
m_Width: 512
m_Width: 384
m_Height: 1308
m_AntiAliasing: 1
m_DepthFormat: 2
Expand Down
6 changes: 3 additions & 3 deletions Assets/farlab_logger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public class farlab_logger : MonoBehaviour {
private RemoteHandManager localHandManager;
private MaleAvatarController localPedestrian;
private Queue<string> EventLog= new Queue<string>();
private int epoch=0;
private double epoch=0.0d;
public static char sep = ';'; //Separator for data values.

/**The LogVariable class is a blueprint for the variable to be logged.
Expand Down Expand Up @@ -251,7 +251,7 @@ private void Awake() {
LogVariable EventLogVar = new LogVariable("D1", "Event log", delegate () { return EventLog.Count >0 ? EventLog.Dequeue() : " "; });

LogVariable time = new LogVariable("U", "Game Time", delegate () { return Time.time.ToString("F4"); });
LogVariable realTime = new LogVariable("U", "Real Time", delegate () { return epoch>0 ? epoch + Time.time.ToString("F4") : " "; });
LogVariable realTime = new LogVariable("U", "Real Time", delegate () { return epoch>0 ? (epoch + Time.time).ToString("F4") : " "; });
LogVariable frame = new LogVariable("U", "Frame Number", delegate () { return Time.frameCount.ToString(); });


Expand All @@ -263,7 +263,7 @@ private void Awake() {
void Start() {


epoch = (int)( System.DateTime.UtcNow - new System.DateTime(1970, 1, 1) ).TotalSeconds; //Epoch Time
epoch = (double)(( System.DateTime.UtcNow - new System.DateTime(1970, 1, 1) ).TotalSeconds - Time.time); //Epoch Time
DateTime Now = System.DateTime.Now;
path = @"D:\Logs\" + Now.Year.ToString() +"-"+Now.Month.ToString() + "-"+Now.Day.ToString() + "-"+Now.Hour.ToString() + "-"+Now.Minute.ToString() + "-"+Now.Second.ToString() + "-"; //Log file path
//path = @"D:\Logs\" + epoch.toString()+"-";
Expand Down
2 changes: 1 addition & 1 deletion Assets/seatCallibration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ void OnGUI()
break;
case 3:
case 4:
displayString = "Callibration DONE!";
displayString = "Callibration Done!";
gs.normal.textColor = Color.black;
break;
case 5:
Expand Down
Binary file modified ExternalResources/Car/XE_Adapted1.blend
Binary file not shown.
Binary file modified ExternalResources/Car/XE_Adapted1.blend1
Binary file not shown.

0 comments on commit fcb83fa

Please sign in to comment.