/// <summary> /// Sets the vectors active and updates thier position and directions /// </summary> private void UpdateVectors() { if (selectedInstance == null) { return; } cameraDistance = Vector3.Distance(selectedInstance.position, FlightCamera.fetch.transform.position) / 4; if (referenceSystem == Space.World) { fwdVR.SetShow(true); upVR.SetShow(true); rightVR.SetShow(true); fwdVR.Vector = selectedInstance.groupCenter.gameObject.transform.forward; fwdVR.Start = vectorDrawPosition; fwdVR.Scale = cameraDistance; fwdVR.draw(); upVR.Vector = selectedInstance.groupCenter.gameObject.transform.up; upVR.Start = vectorDrawPosition; upVR.Scale = cameraDistance; upVR.draw(); rightVR.Vector = selectedInstance.groupCenter.gameObject.transform.right; rightVR.Start = vectorDrawPosition; rightVR.Scale = cameraDistance; rightVR.draw(); } else { fwdVR.SetShow(true); upVR.SetShow(true); rightVR.SetShow(true); fwdVR.Vector = selectedInstance.transform.forward; fwdVR.Start = vectorDrawPosition; fwdVR.Scale = cameraDistance; fwdVR.draw(); upVR.Vector = selectedInstance.transform.up; upVR.Start = vectorDrawPosition; upVR.Scale = cameraDistance; upVR.draw(); rightVR.Vector = selectedInstance.transform.right; rightVR.Start = vectorDrawPosition; rightVR.Scale = cameraDistance; rightVR.draw(); } }
/// <summary> /// Sets the vectors active and updates thier position and directions /// </summary> private void UpdateVectors() { if (selectedObject == null) { return; } if (referenceSystem == Space.Self) { fwdVR.SetShow(true); upVR.SetShow(true); rightVR.SetShow(true); northVR.SetShow(false); eastVR.SetShow(false); fwdVR.Vector = selectedObject.gameObject.transform.forward; fwdVR.Start = vectorDrawPosition; fwdVR.draw(); upVR.Vector = selectedObject.gameObject.transform.up; upVR.Start = vectorDrawPosition; upVR.draw(); rightVR.Vector = selectedObject.gameObject.transform.right; rightVR.Start = vectorDrawPosition; rightVR.draw(); } if (referenceSystem == Space.World) { northVR.SetShow(true); eastVR.SetShow(true); fwdVR.SetShow(false); upVR.SetShow(false); rightVR.SetShow(false); northVR.Vector = northVector; northVR.Start = vectorDrawPosition; northVR.draw(); eastVR.Vector = eastVector; eastVR.Start = vectorDrawPosition; eastVR.draw(); } }
/// <summary> /// Sets the vectors active and updates thier position and directions /// </summary> private void UpdateVectors() { if (selectedInstance == null) { return; } fwdVR.SetShow(true); upVR.SetShow(true); rightVR.SetShow(true); fwdVR.Vector = selectedInstance.groupCenter.gameObject.transform.forward; fwdVR.Start = vectorDrawPosition; fwdVR.draw(); upVR.Vector = selectedInstance.groupCenter.gameObject.transform.up; upVR.Start = vectorDrawPosition; upVR.draw(); rightVR.Vector = selectedInstance.groupCenter.gameObject.transform.right; rightVR.Start = vectorDrawPosition; rightVR.draw(); }