*
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
using UnityEngine;
|
||||
using System.Collections;
|
||||
|
||||
[ExecuteInEditMode]
|
||||
public class QuadcopterEditorOritentationController : MonoBehaviour {
|
||||
|
||||
public FlightController target;
|
||||
|
||||
// Use this for initialization
|
||||
void Start () {
|
||||
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update () {
|
||||
|
||||
}
|
||||
|
||||
void OnDrawGizmos(){
|
||||
Gizmos.color = Color.red;
|
||||
Gizmos.DrawLine (transform.position, transform.position + transform.right);
|
||||
Gizmos.color = Color.green;
|
||||
Gizmos.DrawLine (transform.position, transform.position + transform.up);
|
||||
Gizmos.color = Color.blue;
|
||||
Gizmos.DrawLine (transform.position, transform.position + transform.forward);
|
||||
|
||||
|
||||
if (enabled) {
|
||||
if(target != null){
|
||||
target.targetOrientation = transform.rotation;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user