server rotation fix
All checks were successful
studiorailgun/Renderer/pipeline/head This commit looks good
All checks were successful
studiorailgun/Renderer/pipeline/head This commit looks good
This commit is contained in:
parent
b1b3d90b70
commit
d25e07f35a
@ -18,5 +18,4 @@
|
|||||||
Hitboxes between server and client feel wayyyy off
|
Hitboxes between server and client feel wayyyy off
|
||||||
|
|
||||||
+ bug fixes
|
+ bug fixes
|
||||||
Walk animation does not interrupt on stopping walking
|
|
||||||
|
|
||||||
|
|||||||
@ -518,6 +518,8 @@ Jump sound effects
|
|||||||
Don't play walking audio when entity is jumping
|
Don't play walking audio when entity is jumping
|
||||||
Server alert client on collision
|
Server alert client on collision
|
||||||
Sound effect on sword hit
|
Sound effect on sword hit
|
||||||
|
Fix walk animation not stopping on state change in ground movement trees
|
||||||
|
Fix server entity not rotating when ai commands it to
|
||||||
|
|
||||||
(08/09/2024)
|
(08/09/2024)
|
||||||
Math overhaul
|
Math overhaul
|
||||||
|
|||||||
@ -213,7 +213,6 @@ public class ServerGroundMovementTree implements BehaviorTree {
|
|||||||
}
|
}
|
||||||
Quaterniond movementQuaternion = new Quaterniond().rotationTo(MathUtils.getOriginVector(), new Vector3d(facingVector.x,0,facingVector.z)).normalize();
|
Quaterniond movementQuaternion = new Quaterniond().rotationTo(MathUtils.getOriginVector(), new Vector3d(facingVector.x,0,facingVector.z)).normalize();
|
||||||
Quaterniond rotation = EntityUtils.getRotation(parent);
|
Quaterniond rotation = EntityUtils.getRotation(parent);
|
||||||
rotation.set(movementQuaternion);
|
|
||||||
//TODO: optimize away and document (I know for the moment if this exception isn't here it will bite me in the ass later)
|
//TODO: optimize away and document (I know for the moment if this exception isn't here it will bite me in the ass later)
|
||||||
if(facingVector.length() == 0){
|
if(facingVector.length() == 0){
|
||||||
throw new IllegalStateException("Facing vector length is 0. This will break ODE4J");
|
throw new IllegalStateException("Facing vector length is 0. This will break ODE4J");
|
||||||
@ -255,6 +254,7 @@ public class ServerGroundMovementTree implements BehaviorTree {
|
|||||||
//state machine
|
//state machine
|
||||||
switch(state){
|
switch(state){
|
||||||
case STARTUP: {
|
case STARTUP: {
|
||||||
|
rotation.set(movementQuaternion);
|
||||||
if(poseActor != null){
|
if(poseActor != null){
|
||||||
String animationToPlay = determineCorrectAnimation(MovementTreeState.STARTUP);
|
String animationToPlay = determineCorrectAnimation(MovementTreeState.STARTUP);
|
||||||
if(
|
if(
|
||||||
@ -308,6 +308,7 @@ public class ServerGroundMovementTree implements BehaviorTree {
|
|||||||
);
|
);
|
||||||
} break;
|
} break;
|
||||||
case MOVE: {
|
case MOVE: {
|
||||||
|
rotation.set(movementQuaternion);
|
||||||
//check if can restart animation
|
//check if can restart animation
|
||||||
//if yes, restart animation
|
//if yes, restart animation
|
||||||
if(poseActor != null){
|
if(poseActor != null){
|
||||||
@ -361,6 +362,7 @@ public class ServerGroundMovementTree implements BehaviorTree {
|
|||||||
ServerScriptUtils.fireSignalOnEntity(parent, "entityGroundMove", AccessTransforms.getVector(position));
|
ServerScriptUtils.fireSignalOnEntity(parent, "entityGroundMove", AccessTransforms.getVector(position));
|
||||||
} break;
|
} break;
|
||||||
case SLOWDOWN: {
|
case SLOWDOWN: {
|
||||||
|
rotation.set(movementQuaternion);
|
||||||
//run slowdown code
|
//run slowdown code
|
||||||
if(poseActor != null){
|
if(poseActor != null){
|
||||||
String animationToPlay = determineCorrectAnimation(MovementTreeState.SLOWDOWN);
|
String animationToPlay = determineCorrectAnimation(MovementTreeState.SLOWDOWN);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user