_some progerss?
This commit is contained in:
@@ -137,7 +137,11 @@ public class PlayerMovement : Script
|
||||
private PlayerActor playerActor;
|
||||
public Actor rootActor;
|
||||
|
||||
public Float3 viewAngles;
|
||||
public Float3 viewAngles
|
||||
{
|
||||
get => movementState.viewAngles;
|
||||
set => movementState.viewAngles = value;
|
||||
}
|
||||
private Float3 viewAnglesLastFrame;
|
||||
|
||||
public uint PlayerId => playerActor ? playerActor.PlayerId : 0;
|
||||
@@ -271,8 +275,6 @@ public class PlayerMovement : Script
|
||||
//if (Input is PlayerInputDemo /*&& currentInputFrame2 >= currentInputFrame*/)
|
||||
// return;
|
||||
|
||||
if (World.IsServer)
|
||||
viewAngles = viewAngles;
|
||||
|
||||
Input.SetFrame(World.Frame);
|
||||
Input.UpdateState();
|
||||
@@ -473,6 +475,7 @@ public class PlayerMovement : Script
|
||||
inputState =
|
||||
{
|
||||
Frame = currentFrame,
|
||||
ViewAngles = movementState.viewAngles.XY(),
|
||||
},
|
||||
movementState = movementState,
|
||||
};
|
||||
@@ -488,7 +491,8 @@ public class PlayerMovement : Script
|
||||
Input.SetFrame(currentFrame);
|
||||
Input.UpdateState();
|
||||
|
||||
ApplyInputToCamera(frameInfo.inputState, true);
|
||||
SetCameraEulerAngles(new Float3(frameInfo.inputState.ViewAngles.X, frameInfo.inputState.ViewAngles.Y, viewAngles.Z), true);
|
||||
//ApplyInputToCamera(frameInfo.inputState, true);
|
||||
lastFrameInfo = frameInfo;
|
||||
}
|
||||
SimulatePlayerMovement(frameInfo.inputState, currentFrame);
|
||||
|
||||
Reference in New Issue
Block a user