6 namespace droid.Runtime.Prototyping.Actuators {
10 [AddComponentMenu(ActuatorComponentMenuPath._ComponentMenuPath
12 + ActuatorComponentMenuPath._Postfix)]
17 protected Space _Relative_To = Space.Self;
19 string _rot_x =
"RotX";
20 string _rot_y =
"RotY";
21 string _rot_z =
"RotZ";
23 string _rot_w =
"RotW";
29 public override string PrototypingTypeName {
get {
return "Rotation"; } }
34 protected override void Setup() {
35 this._rot_x = this.Identifier +
"RotX";
36 this._rot_y = this.Identifier +
"RotY";
37 this._rot_z = this.Identifier +
"RotZ";
38 this._rot_w = this.Identifier +
"RotW";
59 this.Parent?.UnRegister(
this, this._rot_x);
60 this.Parent?.UnRegister(
this, this._rot_y);
61 this.Parent?.UnRegister(
this, this._rot_z);
62 this.Parent?.UnRegister(
this, this._rot_w);
70 var transform_rotation = this.transform.rotation;
72 transform_rotation.x = motion.
Strength;
74 transform_rotation.y = motion.
Strength;
76 transform_rotation.z = motion.
Strength;
78 transform_rotation.z = motion.
Strength;
81 this.transform.rotation = transform_rotation;
override void UnRegisterComponent()
override void RegisterComponent()
override void InnerApplyMotion(IMotion motion)