1
0
Fork 0

Small scene | cam fixes

This commit is contained in:
Saibotk 2018-04-22 23:50:55 +02:00
parent 83e54fb772
commit 6a2c9787e7
2 changed files with 9 additions and 5 deletions

View file

@ -278,8 +278,8 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 122} m_AnchoredPosition: {x: 0, y: 143.6}
m_SizeDelta: {x: 800, y: 200} m_SizeDelta: {x: 800, y: 243.3}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &863866092 --- !u!114 &863866092
MonoBehaviour: MonoBehaviour:
@ -293,7 +293,7 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
m_Material: {fileID: 0} m_Material: {fileID: 0}
m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} m_Color: {r: 0, g: 0, b: 0, a: 1}
m_RaycastTarget: 1 m_RaycastTarget: 1
m_OnCullStateChanged: m_OnCullStateChanged:
m_PersistentCalls: m_PersistentCalls:
@ -313,7 +313,7 @@ MonoBehaviour:
m_HorizontalOverflow: 1 m_HorizontalOverflow: 1
m_VerticalOverflow: 0 m_VerticalOverflow: 0
m_LineSpacing: 1 m_LineSpacing: 1
m_Text: Dungeon Drifter m_Text: "Double D.: \nDungeon Drifter"
--- !u!222 &863866093 --- !u!222 &863866093
CanvasRenderer: CanvasRenderer:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -624,7 +624,9 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 4f52f2b666c1ec64195aad9936df2d4f, type: 3} m_Script: {fileID: 11500000, guid: 4f52f2b666c1ec64195aad9936df2d4f, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
notifications: {fileID: 0}
gameOverPanel: {fileID: 0} gameOverPanel: {fileID: 0}
healthcontroller: {fileID: 0}
--- !u!1 &1586619316 --- !u!1 &1586619316
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -957,4 +959,6 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 4f52f2b666c1ec64195aad9936df2d4f, type: 3} m_Script: {fileID: 11500000, guid: 4f52f2b666c1ec64195aad9936df2d4f, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
notifications: {fileID: 0}
gameOverPanel: {fileID: 0} gameOverPanel: {fileID: 0}
healthcontroller: {fileID: 0}

View file

@ -18,7 +18,7 @@ public class CameraControl : MonoBehaviour {
void LateUpdate() { void LateUpdate() {
if ( followThis == null ) if ( followThis == null )
return; return;
var target = followThis.transform.position + offset; var target = followThis.transform.position; // + offset;
var targetVec = target - transform.position; var targetVec = target - transform.position;
targetVec.Scale(new Vector3(0.05f, 0.05f, 0)); targetVec.Scale(new Vector3(0.05f, 0.05f, 0));