Beispiel #1
0
 /// <summary>
 /// 欧拉角匀速旋转
 /// </summary>
 /// <param name="TargetEulerAngle">目标欧拉角</param>
 /// <param name="RotatingMoveSpeed">旋转速度</param>
 /// <param name="space">坐标系</param>
 public static void SE_EulerAngles_MoveTowards(this Transform transform, Vector3 TargetEulerAngle, float RotatingMoveSpeed, Space space = Space.World)
 {
     if (space == Space.World)
     {
         transform.eulerAngles = SS_EulerAngleRotation.EulerAngles_MoveTowards(transform.eulerAngles, TargetEulerAngle, RotatingMoveSpeed);
     }
     else
     {
         transform.localEulerAngles = SS_EulerAngleRotation.EulerAngles_MoveTowards(transform.localEulerAngles, TargetEulerAngle, RotatingMoveSpeed);
     }
 }
Beispiel #2
0
 /// <summary>
 /// 电机运行 : 匀速旋转
 /// </summary>
 /// <param name="Time_deltaTime">时间参数</param>
 /// <returns>电机</returns>
 public SD_Motor_EulerAngle Run_MoveTowardsAngle(float Time_deltaTime)
 {
     MotorSave = SS_EulerAngleRotation.EulerAngles_MoveTowards(MotorSave, MotorTarget, MotorSpeed * Time_deltaTime);
     return(this);
 }