模型替换

master
GamerHJD 1 year ago
parent 597d31ed5f
commit fb9d990f15

@ -5124,7 +5124,7 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 210506936}
m_LocalRotation: {x: 0, y: 0.99070066, z: -0.13605957, w: 0}
m_LocalPosition: {x: -40.99, y: 3.5809999, z: 150.59901}
m_LocalPosition: {x: -41.578, y: 3.5809999, z: 152.12102}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
@ -9766,7 +9766,7 @@ PrefabInstance:
- target: {fileID: -8679921383154817045, guid: bf7660972d1aa4944917a9cd7bb0dcab,
type: 3}
propertyPath: m_LocalRotation.y
value: 0.7071068
value: -0.7071068
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: bf7660972d1aa4944917a9cd7bb0dcab,
type: 3}
@ -9781,7 +9781,7 @@ PrefabInstance:
- target: {fileID: -8679921383154817045, guid: bf7660972d1aa4944917a9cd7bb0dcab,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 90
value: -90
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: bf7660972d1aa4944917a9cd7bb0dcab,
type: 3}
@ -20711,7 +20711,7 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 801163505}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -40.99, y: 3.5809999, z: 150.59901}
m_LocalPosition: {x: -41.578, y: 3.5809999, z: 152.12102}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 1552527552}
@ -37403,7 +37403,7 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1473481405}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -43.52, y: 1.560401, z: 134.94}
m_LocalPosition: {x: -43.17, y: 1.560401, z: 134.94}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
@ -39293,7 +39293,7 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1552527550}
m_LocalRotation: {x: 5.4732193e-16, y: 0.9880619, z: -0.15405743, w: 3.510301e-15}
m_LocalPosition: {x: 0.12000275, y: 0.31519413, z: -1.0780029}
m_LocalPosition: {x: 0.7080002, y: 0.31519413, z: -2.600006}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 1564126269}
@ -43305,7 +43305,7 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1739047877}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -44.584, y: 1.560401, z: 127.27}
m_LocalPosition: {x: -44.01, y: 1.560401, z: 126.989}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
@ -48351,14 +48351,14 @@ Transform:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1956651421}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalRotation: {x: 0, y: 1, z: 0, w: 0}
m_LocalPosition: {x: -40.91, y: 1.5604014, z: 145.49}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 352930096}
m_Father: {fileID: 0}
m_RootOrder: 12
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_LocalEulerAnglesHint: {x: 0, y: 180, z: 0}
--- !u!114 &1956651423
MonoBehaviour:
m_ObjectHideFlags: 0

@ -33,9 +33,9 @@ public class PlayerController : MonoBehaviour
yield return new WaitForFixedUpdate();
Vector3 moveDir = (targetPos - ts.position).normalized;
ts.position += moveDir * Time.fixedDeltaTime * speed;
//Quaternion targetRotation = Quaternion.LookRotation(targetPos - ts.position);
//Debug.Log(targetRotation);
//ts.rotation = Quaternion.Lerp(ts.rotation, targetRotation, 0.01f);
Quaternion targetRotation = Quaternion.LookRotation(targetPos - ts.position);
Debug.Log(targetRotation);
ts.rotation = Quaternion.Lerp(ts.rotation, targetRotation, 0.01f);
if (Vector3.Distance(ts.position, targetPos) <= 0.1) {
ts.position = targetPos;
animator.SetBool("Walk", false);
@ -53,8 +53,8 @@ public class PlayerController : MonoBehaviour
yield return new WaitForFixedUpdate();
Vector3 moveDir = (targetPos - ts.position).normalized;
ts.position += moveDir * Time.fixedDeltaTime * speed * 1.5f;
//Quaternion targetRotation = Quaternion.LookRotation(targetPos - ts.position);
//ts.rotation = Quaternion.Lerp(ts.rotation, targetRotation, 0.01f);
Quaternion targetRotation = Quaternion.LookRotation(targetPos - ts.position);
ts.rotation = Quaternion.Lerp(ts.rotation, targetRotation, 0.01f);
if (Vector3.Distance(ts.position, targetPos) <= 0.1)
{
ts.position = targetPos;
@ -66,7 +66,8 @@ public class PlayerController : MonoBehaviour
}
IEnumerator Squat(Transform my, Transform ts) {
transform.localEulerAngles = new Vector3(0,90,0);
transform.position = new Vector3(-46.55f, 1.560401f, 126.989f);
transform.localEulerAngles = new Vector3(0,270,0);
animator.SetTrigger("Squat");
Invoke("E_OpenStep1_2", 1);
yield return null;

Loading…
Cancel
Save