7 namespace droid.Runtime.Prototyping.Sensors.Transform {
11 [AddComponentMenu(SensorComponentMenuPath._ComponentMenuPath
12 +
"SingleAxisTransform" 13 + SensorComponentMenuPath._Postfix)]
16 [SerializeField] [SearchableEnum]
Axis _dim =
Axis.X_;
29 this.ObservationValue = this.transform.position.x;
32 this.ObservationValue = this.transform.position.y;
35 this.ObservationValue = this.transform.position.z;
38 this.ObservationValue = this.transform.rotation.eulerAngles.x;
41 this.ObservationValue = this.transform.rotation.eulerAngles.y;
44 this.ObservationValue = this.transform.rotation.eulerAngles.z;
47 this.ObservationValue = this.transform.forward.x;
50 this.ObservationValue = this.transform.forward.y;
53 this.ObservationValue = this.transform.forward.z;
55 default:
throw new ArgumentOutOfRangeException();
61 var position = this.transform.position;
66 Debug.DrawLine(position, position + Vector3.right * 2, Color.green);
71 Debug.DrawLine(position, position + Vector3.up * 2, Color.green);
75 Debug.DrawLine(position,
76 position + Vector3.forward * 2,
79 case Axis.Dir_x_:
break;
80 case Axis.Dir_y_:
break;
81 case Axis.Dir_z_:
break;
83 Gizmos.DrawIcon(position,
"console.warnicon",
true);