고다경

Intro Scene에서 Quad를 GameObject follow로 수정 후 움직임 구현

......@@ -743,15 +743,15 @@ RectTransform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1153664853}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 500}
m_LocalScale: {x: 1, y: 1, z: 1}
m_LocalPosition: {x: 0, y: 0, z: 150}
m_LocalScale: {x: 1, y: 1, z: 200}
m_Children: []
m_Father: {fileID: 1190618928}
m_RootOrder: 4
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: -100}
m_AnchoredPosition: {x: 0, y: 10}
m_SizeDelta: {x: 50, y: 50}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1153664855
......@@ -802,7 +802,7 @@ MonoBehaviour:
m_EditorClassIdentifier:
BodySrcManager: {fileID: 1330895655}
TrackedJoint: 11
multiplier: 10
multiplier: 300
--- !u!1 &1190618924
GameObject:
m_ObjectHideFlags: 0
......
......@@ -49,7 +49,7 @@ public class DetectJoints : MonoBehaviour
{
var pos = body.Joints[TrackedJoint].Position;
//gameObject.transform.position = new Vector3(pos.X*multiplier, pos.Y*multiplier);
gameObject.transform.position = new Vector3(pos.X * (multiplier+50), pos.Y * multiplier/3, multiplier/2);
gameObject.transform.position = new Vector3(pos.X * multiplier * 2, pos.Y * multiplier, multiplier/2);
}
}
......
......@@ -9,14 +9,14 @@ public class Title : MonoBehaviour
{
public string SceneToLoad;
GameObject quad; //커서
GameObject follow; //커서
Vector3 pos;
private float timer;
private void Start()
{
Debug.Log("Start");
quad = GameObject.Find("follow").gameObject;
follow = GameObject.Find("follow").gameObject;
}
public void LoadGame()
......@@ -28,11 +28,11 @@ public class Title : MonoBehaviour
{
Debug.Log("Update");
pos = quad.transform.position;
pos = follow.transform.position;
Debug.Log(pos);
if (pos.x >= 145 && pos.x <= 195 && pos.y >= -18 && pos.y <= -10) {
if (pos.x >= 340 && pos.x <= 600 && pos.y >= 175 && pos.y <= 224 &&pos.z == 150) {
timer += Time.deltaTime;
Debug.Log("Timer: "+ timer);
......