rj-action-library/Runtime/Actions/Node3D/CopyPose.cs

34 lines
520 B
C#
Raw Normal View History

2025-01-03 12:09:23 +00:00
using Godot;
namespace Rokojori
{
[GlobalClass, Tool ]
public partial class CopyPose : RJAction
{
[Export]
public Node3D source;
[Export]
public Node3D target;
public override void _Process( double delta )
{
_OnTrigger();
}
public override void _OnTrigger()
{
if ( source == null || target == null )
{
return;
}
target.GlobalPosition = source.GlobalPosition;
target.GlobalRotation = source.GlobalRotation;
}
}
}