This commit is contained in:
CortexCore
2023-07-18 16:42:33 +08:00
parent 5f6975ca67
commit 37f46e6d16
25 changed files with 335 additions and 105 deletions

View File

@@ -1,15 +0,0 @@
using Godot;
using RosSharp.RosBridgeClient.Protocols;
namespace BITKit;
/// <summary>
/// 使用Godot.Node作为容器的RosClient
/// </summary>
public partial class ROSClientService : Node
{
public override void _Ready()
{
WebSocketNetProtocol protocol = new("ws://");
RosSharp.RosBridgeClient.RosSocket client = new(protocol);
}
}

View File

@@ -26,9 +26,12 @@ public partial class RotationComponent : EntityComponent
/// 可读可写的当前角度
/// </summary>
public float CurrentAngle;
[ExportCategory("Nodes")]
[Export] public Node3D node3D;
public override void _Ready()
{
//保存默认角度
OriginalEuler = Rotation;
OriginalEuler = node3D.RotationDegrees;
}
}

View File

@@ -148,7 +148,7 @@ public partial class SCADAService : Node,IProvider<string>,IActivable
euler.X = Mathf.DegToRad(euler.X);
euler.Y = Mathf.DegToRad(euler.Y);
euler.Z = Mathf.DegToRad(euler.Z);
rotationComponent.Rotation = euler;
rotationComponent.node3D.Rotation = euler;
//rotationComponent.RotationDegrees = euler;