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

Shaking tools #258

Open
KaxelOleg opened this issue Jun 14, 2021 · 17 comments
Open

Shaking tools #258

KaxelOleg opened this issue Jun 14, 2021 · 17 comments
Assignees
Labels
bug Something isn't working

Comments

@KaxelOleg
Copy link

Run a clean project, turn on the client and start turning in different directions and looking at the weapon (pistol, rifle, bow), they will shake, and if you run the game as a server, there will be no shaking. Is this a bug?

@KaxelOleg KaxelOleg added the bug Something isn't working label Jun 14, 2021
@dyanikoglu
Copy link
Owner

Can you give more clean steps to reproduce this? What do you mean by "turn on the client"?

@dyanikoglu
Copy link
Owner

Also please follow the issue template while opening issues.

@KaxelOleg
Copy link
Author

Also please follow the issue template while opening issues.

Sorry I didn't follow the template. You just need to start a clean project with any launch in client mode, you can standalone or editor.

@dyanikoglu
Copy link
Owner

Ok, will try to replicate the issue and let you know about results. Are you on 4.26.2?

@KaxelOleg
Copy link
Author

Ok, will try to replicate the issue and let you know about results. Are you on 4.26.2?

Yes.

@davchezt
Copy link
Contributor

davchezt commented Jun 28, 2021

i have facing this issue long time ago till now, i found that jitter come from turn in place, when i disable character rotation the jitter are gone

@troelsnygaard
Copy link

troelsnygaard commented Jun 28, 2021

Hi, I also experienced this one. I'll try to fill out the bug report template below:

Description:
When not moving and aiming, the character will stutter (angular) for the other clients when playing the 'turn in place' animation. The owner won't see it.

Steps to reproduce the behavior:

  1. Go to play mode with 2 clients. (Maybe you have to turn on network emulation).
  2. Enter first person for character 1.
  3. Set overlay state to Rifle on character 1 to see the problem more clearly.
  4. With character 1 - Slowly rotate till you hit the angle where the turn in place animation plays.
  5. On the other client's view, notice how the character and especially the rifle stutters.

Expected behavior
No stutter should occur when playing the turn in place animation.

Screenshots and Videos
Recording of the bug below. Also attached to the post. Especially at the last turn it's very obvious.
https://www.dropbox.com/s/rvyg2ogeak5u1k5/StutterWhenRotateAnimating.mp4?dl=0

Additional context
It only seems happens during the turn in place animation. It doesn't seem to happen when the character is moving (as the turn in place animation doesn't play). This is 4.26.

StutterWhenRotateAnimating.mp4

@KaxelOleg
Copy link
Author

Hi, I also experienced this one. I'll try to fill out the bug report template below:

Description:
When not moving and aiming, the character will stutter (angular) for the other clients when playing the 'turn in place' animation. The owner won't see it.

Steps to reproduce the behavior:

  1. Go to play mode with 2 clients. (Maybe you have to turn on network emulation).
  2. Enter first person for character 1.
  3. Set overlay state to Rifle on character 1 to see the problem more clearly.
  4. With character 1 - Slowly rotate till you hit the angle where the turn in place animation plays.
  5. On the other client's view, notice how the character and especially the rifle stutters.

Expected behavior
No stutter should occur when playing the turn in place animation.

Screenshots and Videos
Recording of the bug below. Also attached to the post. Especially at the last turn it's very obvious.
https://www.dropbox.com/s/rvyg2ogeak5u1k5/StutterWhenRotateAnimating.mp4?dl=0

Additional context
It only seems happens during the turn in place animation. It doesn't seem to happen when the character is moving (as the turn in place animation doesn't play). This is 4.26.

StutterWhenRotateAnimating.mp4

Try not to aim, then stuttering will be visible for both clients.

@KaxelOleg
Copy link
Author

And there is also such a bug, when the character turned around and only another client sees it, and for the first there was no turn and maybe vice versa. This mainly happens when you try to rotate a small angle and the rotation animation fires, but for someone it is not visible.

@troelsnygaard
Copy link

And there is also such a bug, when the character turned around and only another client sees it, and for the first there was no turn and maybe vice versa. This mainly happens when you try to rotate a small angle and the rotation animation fires, but for someone it is not visible.

I did also notice that, but that went away when going into 1st person view. However, I'm not sure the 2 issues are connected. So that should probably be created as a separate Issue with a proper description and screen recording.

@KaxelOleg
Copy link
Author

And there is also such a bug, when the character turned around and only another client sees it, and for the first there was no turn and maybe vice versa. This mainly happens when you try to rotate a small angle and the rotation animation fires, but for someone it is not visible.

I did also notice that, but that went away when going into 1st person view. However, I'm not sure the 2 issues are connected. So that should probably be created as a separate Issue with a proper description and screen recording.

Yes you are right, I just decided to write it here, thinking that this way more attention of Doga will be drawn into the topic.

@dyanikoglu
Copy link
Owner

I will try to include this fix in next (and probably final) release. Thanks for your help 👍🏻

@dyanikoglu
Copy link
Owner

After reviewing mentioned discord messages, I've found out some important parts for the fix is not enclosed in those messages, thus I'm not able to implement that fix for now. If more detailed information with code snippets is shared, I'll include them within next release.

@KaxelOleg
Copy link
Author

After reviewing mentioned discord messages, I've found out some important parts for the fix is not enclosed in those messages, thus I'm not able to implement that fix for now. If more detailed information with code snippets is shared, I'll include them within next release.

I'm not good at this, maybe the guy who gave the links to the discord of the message can help you.

@ameaninglessname
Copy link
Contributor

ameaninglessname commented Dec 6, 2021

I found a simple "solution" to make it not shaking--- interplate AimingValues.SpineRotation.Yaw on simulated proxy

if (Character->GetLocalRole() != ROLE_SimulatedProxy)
{
    AimingValues.SpineRotation.Yaw = AimingValues.AimingAngle.X / 4.0f;
}
else
{
    AimingValues.SpineRotation.Yaw = FMath::FInterpTo(AimingValues.SpineRotation.Yaw,
                                                        AimingValues.AimingAngle.X / 4.0f,
                                                        DeltaSeconds, Config.SpineRotationYawInterpSpeed);
}


UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "ALS|Main Configuration")
float SpineRotationYawInterpSpeed = 1.0f;

but it cause a problem : aming rotation is laggy on slimulated proxy(because it's lerpping).

I am trying hard to find to root cause...

And I found a difference between autonomous proxy and simulated proxy when it comes to aiming rotation.

For autonomous proxy:
Always aiming the control rotation, no matter how the "Turn in place montage" plays. (It will apply some rotation amount to character)

For simulated proxy:
It's like it will first rotate the "rotation amount", then aiming back to the control rotation when turn in place happens.

Guys, any ideas about this?

wuguyannian added a commit to wuguyannian/ALS-Community that referenced this issue Dec 13, 2021
ameaninglessname added a commit to ameaninglessname/ALS-Community that referenced this issue Oct 4, 2022
    in order to get rid of the rotation noise from the build in system, I override UALSCharacterMovementComponent::SmoothCorrection to skip net correction BY DEFAULT, disable it with "Als.Debug.bSkipSmoothCorrection 0"
ameaninglessname added a commit to ameaninglessname/ALS-Community that referenced this issue Oct 4, 2022
    change RInterpConstantTo to RInterpTo to avoid overshot when interpolating rotation, convert original speed into GUESSING speed
ameaninglessname added a commit to ameaninglessname/ALS-Community that referenced this issue Oct 4, 2022
    to avoid overshot when interpolating rotation on ROLE_SimulatedProxy, only drive it with replicated actor rotation(the PreventMeshMove has side effect, so it's commented out)
ameaninglessname added a commit to ameaninglessname/ALS-Community that referenced this issue Oct 4, 2022
    DedicatedServer rotation is driven by client RPC now, because curve driven rotation is only available when VisibilityBasedAnimTickOption is set to AlwaysTickPoseAndRefreshBones(AFAIK), so we need a more general approach. (it's a naive approach but should be enough for debugging, for a formal solution see CallServerMovePacked, FCharacterNetworkMoveData)
@ameaninglessname
Copy link
Contributor

Last weekend i tried to tackle this issue, but with no luck🥲.

If anyone interested, cherry-pick these debugging commit in my fork to keep going.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants