更新Readme

和CPS验证场景
This commit is contained in:
CortexCore
2023-06-16 17:08:59 +08:00
parent 2bb2fe10c3
commit be7d746959
17 changed files with 527 additions and 119 deletions

View File

@@ -16,6 +16,8 @@ namespace BITKit;
/// </summary>
public partial class SCADAService : Node
{
public const string _CurrentAngle="CurrentAngle";
public const string _CurrentRotation="CurrentRotation";
/// <summary>
/// 在构造函数中注入依赖
/// </summary>
@@ -182,10 +184,10 @@ public partial class SCADAService : Node
//最终角度 = 当前角度*角度权重 + 角度偏移 + 原始角度
var euler = currentAngle * rotationComponent.Weight + rotationComponent.Offset + rotationComponent.OriginalEuler;
//为Node3D.Rotation提交最后的角度计算结果
rotationComponent.Rotation = Quaternion.FromEuler(euler).GetEuler().Normalized();
rotationComponent.RotationDegrees = euler;
rotationComponent.SetMeta("CurrentAngle",currentAngle);
rotationComponent.SetMeta("CurrentRotation",euler);
rotationComponent.SetMeta(_CurrentAngle,(int)currentAngle);
rotationComponent.SetMeta(_CurrentRotation,euler);
}
}
}