using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class UAV : MonoBehaviour
{
///
/// 无人机旋翼
///
public Transform[] Uav_RotorWings;
/* 顺序为俯视左上左下右下右上,如下所示
* 14
* 23
*/
public float angle1 = 1;
public float angle2 = 1;
public float angle3 = 1;
public float angle4 = 1;
private void Update()
{
Uav_RotorWings[0].Rotate(Vector3.up, angle1);
Uav_RotorWings[1].Rotate(Vector3.down, angle2);
Uav_RotorWings[2].Rotate(Vector3.up, angle3);
Uav_RotorWings[3].Rotate(Vector3.down, angle4);
UpdatePosition();
}
public void RotorWingRotating(params Transform[] wings)
{
Array.ForEach(wings, wing =>
{
});
}
/*
* 飞行规则:
* 假设无人机起飞所需升力为4,则需要每根旋翼提供至少1
* 1,2对应Z+
* 3,4对应Z-
*
* 1,4对应X+
* 2,3对应X-
*
* 1,3对应Y+
* 2,4对应Y-
*/
///
/// 更新位置
///
public void UpdatePosition()
{
}
}