增加特效 ,优化道具外观

This commit is contained in:
2024-10-27 17:06:07 +08:00
parent 25e940ece8
commit daeaa8487a
40 changed files with 89000 additions and 347 deletions

View File

@@ -31,9 +31,11 @@ namespace Game.Component
// 获取前方方向的世界坐标
Vector3 forward = (Vector3)vector;
//根据遥感向量获取一个01的移动速度系数
float speedOffset = forward.magnitude;
Quaternion targetRotation = Quaternion.FromToRotation (Vector3.up , forward.normalized);
transform.rotation = Quaternion.Lerp (transform.rotation , targetRotation , 0.25f);
float speedOffset = forward.magnitude;
Quaternion targetRotation = Quaternion.FromToRotation (Vector3.up , forward.normalized);
var targetRotationEulerAngles = targetRotation.eulerAngles;
targetRotationEulerAngles = new Vector3 (0 , 0 , targetRotationEulerAngles.z);
transform.rotation = Quaternion.Euler (targetRotationEulerAngles);
// Debug.DrawLine (transform.position , transform.position + forward , Color.magenta);
this.transform.Translate ( Vector3.up * speedOffset * CurSpeed * Time.deltaTime);
// this.rigidbody2D.MovePosition (t.position + ((Vector3)vector * speed * Time.deltaTime));