Skip to content

Commit

Permalink
resolve physic bug
Browse files Browse the repository at this point in the history
  • Loading branch information
loulou123546 committed Dec 1, 2018
1 parent 992e378 commit 86df086
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 24 deletions.
8 changes: 4 additions & 4 deletions On The CALL/Assets/UI/VHC.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ void Update () {
if (camOBJ != null && camOBJ.GetComponent<perso>().inacar == true) {
gameObject.GetComponent<Rigidbody> ().drag = 1;
gameObject.GetComponent<Rigidbody> ().angularDrag = 1;
//camOBJ.GetComponent<Transform> ().position = new Vector3 (gameObject.GetComponent<Transform> ().position.x, gameObject.GetComponent<Transform> ().position.y, -10.0f);
camOBJ.GetComponent<Transform> ().position = new Vector3 (gameObject.GetComponent<Transform> ().position.x, gameObject.GetComponent<Transform> ().position.y, -10.0f);

if (Imdriver) {
if (Input.GetKey (KeyCode.Z) && speed < -0.1f) {
Expand Down Expand Up @@ -69,9 +69,9 @@ void Update () {
tox = -Mathf.Sin (Mathf.Deg2Rad * Direction) * speed;
toy = Mathf.Cos (Mathf.Deg2Rad * Direction) * speed;
gameObject.GetComponent<Rigidbody> ().velocity = new Vector3 (tox, toy, 0.0f);
float decalx = -Mathf.Sin (Mathf.Deg2Rad * Direction) * 5;
float decaly = Mathf.Cos (Mathf.Deg2Rad * Direction) * 5;
camOBJ.GetComponent<Transform> ().position = new Vector3 (gameObject.GetComponent<Transform> ().position.x + decalx, gameObject.GetComponent<Transform> ().position.y + decaly, -10.0f);
//float decalx = -Mathf.Sin (Mathf.Deg2Rad * Direction) * 5;
//float decaly = Mathf.Cos (Mathf.Deg2Rad * Direction) * 5;
//camOBJ.GetComponent<Transform> ().position = new Vector3 (gameObject.GetComponent<Transform> ().position.x + decalx, gameObject.GetComponent<Transform> ().position.y + decaly, -10.0f);
}

}else {
Expand Down
38 changes: 19 additions & 19 deletions On The CALL/Assets/scenes/map.unity
Original file line number Diff line number Diff line change
Expand Up @@ -5852,10 +5852,10 @@ RectTransform:
m_Father: {fileID: 518459768}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.4, y: 0.88479215}
m_AnchorMax: {x: 0.6, y: 1}
m_AnchoredPosition: {x: 0.18800354, y: 0.25}
m_SizeDelta: {x: -0.30000305, y: -0.5}
m_AnchorMin: {x: 0.476, y: 0.88479215}
m_AnchorMax: {x: 0.67700005, y: 1}
m_AnchoredPosition: {x: 0.099990845, y: -0.25}
m_SizeDelta: {x: -1.300003, y: -0.5}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &75209703
MonoBehaviour:
Expand Down Expand Up @@ -11664,10 +11664,10 @@ RectTransform:
m_Father: {fileID: 518459768}
m_RootOrder: 7
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.42700002, y: 0.4352079}
m_AnchorMax: {x: 0.5, y: 0.49100003}
m_AnchoredPosition: {x: 0, y: -0.28798485}
m_SizeDelta: {x: 0, y: -0.87000084}
m_AnchorMin: {x: 0.404, y: 0.48020792}
m_AnchorMax: {x: 0.47800002, y: 0.536}
m_AnchoredPosition: {x: 0.049987793, y: 0.26200104}
m_SizeDelta: {x: -1, y: -0.87000084}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!1001 &159267620
Prefab:
Expand Down Expand Up @@ -28154,10 +28154,10 @@ RectTransform:
m_Father: {fileID: 518459768}
m_RootOrder: 6
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.042000003, y: 0.4352079}
m_AnchorMax: {x: 0.416, y: 0.49100003}
m_AnchoredPosition: {x: 0.24300003, y: -0.20000076}
m_SizeDelta: {x: -1.546, y: -1}
m_AnchorMin: {x: 0, y: 0.48200002}
m_AnchorMax: {x: 0.397, y: 0.536}
m_AnchoredPosition: {x: 0.5400009, y: -0.23799515}
m_SizeDelta: {x: -1, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!1001 &386151066
Prefab:
Expand Down Expand Up @@ -40215,7 +40215,7 @@ MonoBehaviour:
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_VerticalOverflow: 1
m_LineSpacing: 1
m_Text: No message ...
--- !u!222 &547607087
Expand All @@ -40237,10 +40237,10 @@ RectTransform:
m_Father: {fileID: 518459768}
m_RootOrder: 5
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.043, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.8737922}
m_AnchoredPosition: {x: 0, y: 0.000015258789}
m_SizeDelta: {x: 0, y: 0}
m_AnchorMin: {x: 0, y: 0.545}
m_AnchorMax: {x: 0.47800002, y: 1}
m_AnchoredPosition: {x: 0.29999924, y: 0.29999924}
m_SizeDelta: {x: -1.5, y: 0.20000076}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!1001 &548213241
Prefab:
Expand Down Expand Up @@ -93877,7 +93877,7 @@ MonoBehaviour:
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: Alpha 0.3.0
m_Text: Alpha 0.3.1
--- !u!222 &1362277411
CanvasRenderer:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -95730,7 +95730,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.045, y: 0.23237637}
m_AnchorMax: {x: 0.26000002, y: 0.28820792}
m_AnchoredPosition: {x: 0.02999878, y: -0.1499939}
m_AnchoredPosition: {x: 0.029968262, y: -0.1499939}
m_SizeDelta: {x: -1.2899933, y: -1}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1401272154
Expand Down
2 changes: 1 addition & 1 deletion On The CALL/Assets/scenes/menu.unity
Original file line number Diff line number Diff line change
Expand Up @@ -1423,7 +1423,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: e53ab84c312c611429d01d535ced8d07, type: 3}
m_Name:
m_EditorClassIdentifier:
VERSION_ACTUAL: 0.3.0
VERSION_ACTUAL: 0.3.1
pseudo_parent: {fileID: 185485807}
pass_parent: {fileID: 1753602589}
maj_text: {fileID: 1771346813}
Expand Down

0 comments on commit 86df086

Please sign in to comment.