Commit 48cee20a authored by 15박보승's avatar 15박보승

EdgeNote 움직임 수정

parent 6199b686
......@@ -27,13 +27,13 @@ Transform:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4640709078173886784}
m_LocalRotation: {x: 0, y: 0, z: 0.7071068, w: 0.7071068}
m_LocalPosition: {x: 0, y: -3, z: 50}
m_LocalScale: {x: 1, y: 10, z: 1}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 10, y: 10, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!33 &4640709078173886787
MeshFilter:
m_ObjectHideFlags: 0
......@@ -111,4 +111,4 @@ MonoBehaviour:
hitSfx:
- {fileID: 8300000, guid: e60d0bfc8448c5040af14e9faeaecae5, type: 3}
- {fileID: 8300000, guid: b90743fe091960d4f837d44bbd2ad318, type: 3}
direction: {x: 0, y: 0, z: 0}
direction: {x: 0, y: -1, z: 0}
......@@ -28,8 +28,8 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4734231541000158423}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -5, y: 0, z: 50}
m_LocalScale: {x: 1, y: 7, z: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 10, y: 10, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
......@@ -111,4 +111,4 @@ MonoBehaviour:
hitSfx:
- {fileID: 8300000, guid: e60d0bfc8448c5040af14e9faeaecae5, type: 3}
- {fileID: 8300000, guid: b90743fe091960d4f837d44bbd2ad318, type: 3}
direction: {x: 0, y: 0, z: 0}
direction: {x: -1, y: 0, z: 0}
......@@ -28,8 +28,8 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1476454008853626150}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 5, y: 0, z: 50}
m_LocalScale: {x: 1, y: 7, z: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 10, y: 10, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
......@@ -111,4 +111,4 @@ MonoBehaviour:
hitSfx:
- {fileID: 8300000, guid: e60d0bfc8448c5040af14e9faeaecae5, type: 3}
- {fileID: 8300000, guid: b90743fe091960d4f837d44bbd2ad318, type: 3}
direction: {x: 0, y: 0, z: 0}
direction: {x: 1, y: 0, z: 0}
......@@ -27,13 +27,13 @@ Transform:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4081910931583206819}
m_LocalRotation: {x: 0, y: 0, z: 0.7071068, w: 0.7071068}
m_LocalPosition: {x: 0, y: 3, z: 50}
m_LocalScale: {x: 1, y: 10, z: 1}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 10, y: 10, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!33 &4081910931583206814
MeshFilter:
m_ObjectHideFlags: 0
......@@ -111,4 +111,4 @@ MonoBehaviour:
hitSfx:
- {fileID: 8300000, guid: e60d0bfc8448c5040af14e9faeaecae5, type: 3}
- {fileID: 8300000, guid: b90743fe091960d4f837d44bbd2ad318, type: 3}
direction: {x: 0, y: 0, z: 0}
direction: {x: 0, y: 1, z: 0}
fileFormatVersion: 2
guid: d9a533cec04e2124e9c31541b4f63e72
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
......@@ -6,6 +6,8 @@ public class EdgeNoteObject : NoteObject
{
[SerializeField]
private Vector3 direction;
private const float radius = 100f;
public void Init(HandType hand)
{
Material mat = GetComponent<Renderer>().material;
......@@ -28,7 +30,22 @@ public class EdgeNoteObject : NoteObject
public override void SetPosition(float remainedTime)
{
transform.position = Vector3.Lerp(endPoint, endPoint + new Vector3(0, 0, 200), remainedTime / maxRemainedTime);
if (remainedTime > 0.5f)
{
transform.position = new Vector3(0, 0, Mathf.Lerp(radius, 500, (remainedTime - 0.5f) * 2));
}
else
{
float angle = Mathf.Lerp(0, 90, Mathf.Pow(remainedTime * 2 - 1, 2));
transform.position = Quaternion.Euler(direction.x * angle, direction.y * angle, 0) * new Vector3(0, 0, radius);
transform.LookAt(Vector3.zero);
}
//transform.position = Vector3.Lerp(endPoint, endPoint + new Vector3(0, 0, 200), remainedTime);
}
public override bool IsHit(Ray ray)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment