2 using System.Collections.Generic;
7 namespace droid.Runtime.Prototyping.Sensors.Transform {
8 [AddComponentMenu(PrototypingComponentMenuPath._ComponentMenuPath +
"Observers/Position")]
13 [Header(
"Observation", order = 103)]
17 [Header(
"Specific", order = 102)]
28 public override string PrototypingTypeName {
get {
return "Position"; } }
33 public Quaternion ObservationValue {
get {
return this._rotation; }
set { this._rotation = value; } }
48 public override IEnumerable<float> FloatEnumerable {
49 get {
return new[] {this.ObservationValue.x, this.ObservationValue.y, this.ObservationValue.z}; }
56 if (this.ParentEnvironment != null && this._space ==
ObservationSpace.Environment_) {
57 this.ObservationValue = this.ParentEnvironment.TransformRotation(this.transform.rotation);
59 this.ObservationValue = this.transform.localRotation;
61 this.ObservationValue = this.transform.rotation;