更新Readme
和CPS验证场景
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user