chore,gd: refactored project structure and started the mantle system
This commit is contained in:
23
player_controller/Scripts/MantleSystem.cs
Normal file
23
player_controller/Scripts/MantleSystem.cs
Normal file
@ -0,0 +1,23 @@
|
||||
using Godot;
|
||||
|
||||
namespace PolarBears.PlayerControllerAddon;
|
||||
|
||||
public partial class MantleSystem: Node3D
|
||||
{
|
||||
private RayCast3D _wallInFrontRaycast3D;
|
||||
|
||||
public void Init(RayCast3D wallInFrontRaycast3D)
|
||||
{
|
||||
_wallInFrontRaycast3D = wallInFrontRaycast3D;
|
||||
}
|
||||
|
||||
public void CheckWallInFront()
|
||||
{
|
||||
var collider = _wallInFrontRaycast3D.GetCollider();
|
||||
if (collider != null)
|
||||
{
|
||||
GD.Print(_wallInFrontRaycast3D.GetCollisionPoint());
|
||||
GD.Print(_wallInFrontRaycast3D.GetCollisionNormal());
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user