You've already forked taptap2024_GJ_chidouren
增加特效 ,优化道具外观
This commit is contained in:
@@ -31,9 +31,11 @@ namespace Game.Component
|
||||
// 获取前方方向的世界坐标
|
||||
Vector3 forward = (Vector3)vector;
|
||||
//根据遥感向量获取一个0,1的移动速度系数
|
||||
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));
|
||||
|
||||
Reference in New Issue
Block a user