//////////////////////////////////////////////// private void UnitMoveTowardsTarget() { _TARGETPanelScript.PanelIsActive(); // Moving transform.position = Vector3.MoveTowards(transform.position, _TARGETLoc, Time.deltaTime * _unitsSpeed); //transform.localPosition = Vector3.zero; // Rotation unit_LocalYAxisRotation.LookAt(_TARGETLoc, Vector3.up); // All the Y rotation we need Vector3 temp = unit_LocalYAxisRotation.localEulerAngles; unit_LocalYAxisRotation.localEulerAngles = new Vector3(0, temp.y, 0); }
public void CubeIsActivated() { _panelScriptChild.PanelIsActive(); }