33 lines
471 B
C#
33 lines
471 B
C#
|
|
using Godot;
|
|
|
|
|
|
namespace Rokojori
|
|
{
|
|
[GlobalClass, Tool ]
|
|
public partial class CopyPosition : 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;
|
|
}
|
|
}
|
|
} |