From 5a689a9e9b57ba77ae4af686da03db34ee910208 Mon Sep 17 00:00:00 2001 From: ipodtouch0218 Date: Mon, 15 Jan 2024 00:25:19 -0500 Subject: [PATCH] nightly 1.8.0.0 (1/14) pt.2 --- Assets/Scripts/Entity/EntityMover.cs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/Assets/Scripts/Entity/EntityMover.cs b/Assets/Scripts/Entity/EntityMover.cs index 1b2ad25464..1aca30cc8a 100644 --- a/Assets/Scripts/Entity/EntityMover.cs +++ b/Assets/Scripts/Entity/EntityMover.cs @@ -4,7 +4,6 @@ using Fusion; using NSMB.Tiles; using NSMB.Utils; -using NSMB.Entities.Player; [SimulationBehaviour] public class EntityMover : NetworkBehaviour, IBeforeTick, IAfterTick, IAfterAllTicks, IRemotePrefabCreated { @@ -280,10 +279,6 @@ private Vector2 CollideAndSlide(Vector2 raycastPos, Vector2 raycastVel, bool gra Vector2 positionToSurfacePoint = (direction * hit.distance) + (alignedDirection * Skin); - if (TryGetComponent(out PlayerController _)) { - Debug.DrawRay(positionToSurfacePoint, hit.normal, Color.red); - } - // Started inside an object if (hit.distance <= 0) { RaycastHit2D stuckHit = Runner.GetPhysicsScene2D().Raycast(raycastPos, (hit.point - raycastPos), Mathf.Max(size.x, size.y), filter); @@ -309,6 +304,7 @@ private Vector2 CollideAndSlide(Vector2 raycastPos, Vector2 raycastVel, bool gra if (Vector2.Dot(positionToSurfacePoint, hit.normal) > 0) { // Hit normal pushing us away from the wall Vector2 offset = (Vector2) Vector3.Project(positionToSurfacePoint, hit.normal); + // Maybe the offset shouldnt be based on the normal??? if (LockX) { offset.x = 0;