Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Potential issue with PlayerController/PlayerPawn #2282

Closed
envision3d opened this issue Feb 4, 2024 · 1 comment
Closed

Potential issue with PlayerController/PlayerPawn #2282

envision3d opened this issue Feb 4, 2024 · 1 comment
Labels
networking wontfix This will not be worked on
Milestone

Comments

@envision3d
Copy link
Contributor

envision3d commented Feb 4, 2024

I'm not sure if this is an issue, nor if it belongs here vs. in the NetworkTransform, but I think it belongs here.

When I add the below code to my Pawn class (which also has a NetworkTransform) and observe the values that get output while moving a non-local pawn, I see a steady stream of non-zero values as expected, but I see a number of 0 values mixed in between when there shouldn't be any.

Given the NetworkTransform is general and not tied specifically to a CharacterController, I'm assuming Velocity is being updated somewhere within the Arizona code.

I'm wondering if this could be having an impact on the smoothness of movement of non-local pawns if Velocity is used to interpolate between updates.

public override void OnUpdate()
{
    if (PlayerState.NetworkClientId != NetworkManager.LocalClientId)
    {
        Debug.Log(">>> " + Controller.Velocity.Length);
    }
}
@mafiesto4 mafiesto4 transferred this issue from FlaxEngine/ArizonaFramework Feb 27, 2024
@mafiesto4
Copy link
Member

Character Controller physics are not fully replicated over network so maybe that velocity could be invalid in some cases. I think it would be better to collect some value and calculate moving average.

Also, there is a task on a roadmap to add NetworkRigidBody, similar to NetworkTransform, where more physics state (like velocity) could be synced. Then similar solution would make sense for characters.

@mafiesto4 mafiesto4 added the wontfix This will not be worked on label Feb 27, 2024
@mafiesto4 mafiesto4 added this to the 1.8 milestone Feb 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
networking wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants