rj-action-library/Runtime/Interactions/CharacterController/GroundReset.cs

22 lines
444 B
C#
Raw Normal View History

2025-01-03 12:09:23 +00:00
using Godot;
using System.Collections;
using System.Collections.Generic;
using Godot.Collections;
namespace Rokojori
{
2025-05-21 20:44:28 +00:00
[Tool]
2025-05-27 06:51:48 +00:00
[GlobalClass, Icon("res://addons/rokojori_action_library/Icons/CCGroundReset.svg")]
2025-01-03 12:09:23 +00:00
public partial class GroundReset:CharacterControllerAction
{
2025-01-08 18:46:17 +00:00
protected override void _OnTrigger()
2025-01-03 12:09:23 +00:00
{
if ( ! body.IsOnFloor() )
{
return;
}
SetVelocity( Vector3.Zero );
}
}
}