1
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Lightbug.CharacterControllerPro.Core;
|
||||
using UnityEngine;
|
||||
|
||||
namespace BITFALL.Entities.Player.Movement
|
||||
{
|
||||
public class GravityOnlyCharacterController : MonoBehaviour
|
||||
{
|
||||
[SerializeField] private CharacterActor actor;
|
||||
|
||||
private void FixedUpdate()
|
||||
{
|
||||
actor.Velocity = Physics.gravity;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@@ -60,6 +60,14 @@ namespace BITFALL.Entities.Player.Movement
|
||||
physics.OnSetPhysics += OnSetPhysics;
|
||||
}
|
||||
|
||||
public override void OnStart()
|
||||
{
|
||||
foreach (var x in GetComponentsInChildren<Collider>(true))
|
||||
{
|
||||
actor.PhysicsComponent.IgnoreCollision(x.transform,true);
|
||||
}
|
||||
}
|
||||
|
||||
private void OnSetPhysics(bool obj)
|
||||
{
|
||||
if (obj is false) return;
|
||||
|
Reference in New Issue
Block a user