From 5f156904535cb0ec72c9fa0b9c9417968c9ddda3 Mon Sep 17 00:00:00 2001 From: austin Date: Mon, 12 Aug 2024 15:32:17 -0400 Subject: [PATCH] fix hitcapsule misalignment --- docs/src/progress/currenttarget.md | 1 - docs/src/progress/renderertodo.md | 1 + src/main/java/electrosphere/controls/ControlHandler.java | 2 +- .../entity/state/hitbox/HitboxCollectionState.java | 2 +- 4 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/src/progress/currenttarget.md b/docs/src/progress/currenttarget.md index 73d09aff..559b37b1 100644 --- a/docs/src/progress/currenttarget.md +++ b/docs/src/progress/currenttarget.md @@ -19,6 +19,5 @@ Hitboxes between server and client feel wayyyy off + bug fixes - Capsule hitboxes aren't connecting correctly diff --git a/docs/src/progress/renderertodo.md b/docs/src/progress/renderertodo.md index d81af51a..2608cfe2 100644 --- a/docs/src/progress/renderertodo.md +++ b/docs/src/progress/renderertodo.md @@ -542,6 +542,7 @@ Fix server animation playing at reduced timescale Block override concept for hitboxes Block sfx Fix server hitboxes freaking out at animation end +Fix hitcapsule misalignment # TODO diff --git a/src/main/java/electrosphere/controls/ControlHandler.java b/src/main/java/electrosphere/controls/ControlHandler.java index 24e797da..878006d2 100644 --- a/src/main/java/electrosphere/controls/ControlHandler.java +++ b/src/main/java/electrosphere/controls/ControlHandler.java @@ -249,7 +249,7 @@ public class ControlHandler { boolean shouldRecaptureScreen = false; //controls whether the camera is first or third person - boolean cameraIsThirdPerson = false; + boolean cameraIsThirdPerson = true; //The list of window strings that would block main game controls static String[] controlBlockingWindows = new String[]{ diff --git a/src/main/java/electrosphere/entity/state/hitbox/HitboxCollectionState.java b/src/main/java/electrosphere/entity/state/hitbox/HitboxCollectionState.java index 4a6a6e5e..a1f99da4 100644 --- a/src/main/java/electrosphere/entity/state/hitbox/HitboxCollectionState.java +++ b/src/main/java/electrosphere/entity/state/hitbox/HitboxCollectionState.java @@ -366,7 +366,7 @@ public class HitboxCollectionState { //the second quaternion is a rotation along the x axis. This is used to put the hitbox rotation into ode's space //ode is Z-axis-up if(previousWorldPos.distance(worldPosition) > 0.0){ - rotation = MathUtils.calculateRotationFromPointToPoint(previousWorldPos,worldPosition).mul(new Quaterniond(0,0,0.707,0.707)); + rotation = MathUtils.calculateRotationFromPointToPoint(previousWorldPos,worldPosition).mul(new Quaterniond(0,0.707,0,0.707)); } //create new capsule