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

Client not predicting value of AnimGraphUpdatedEnabled of a CBaseViewModel's anim graph #409

Open
isaac-goldberg opened this issue Apr 11, 2024 · 0 comments
Labels
untriaged New issue has not been triaged

Comments

@isaac-goldberg
Copy link

isaac-goldberg commented Apr 11, 2024

I'm trying to pause or disable player view model animations. I need it to be perfectly still, because I'm taking a bunch of screenshots of the view model and need the position of their arms/gloves/weapon to be exactly the same across all images. I have the player's CBaseViewModel, and simply setting the AnimGraphUpdatedEnabled to false on the server does prevent the view model from playing more animations. However, the view model keeps sort of shaking, quickly moving back and forth ever so slightly forever.

I assume that this is because the client is still trying to play more animations, like the idling animation, and has enough time to move ever so slightly before the server communicates back that animation is disabled and stops the view model from moving, and then it keeps repeating this cycle. I tried using SetStateChanged to transmit this to the client, and my implementation seems correct (I confirmed that m_bAnimGraphUpdateEnabled is network-enabled) but it didn't solve the issue.

This was my code:

Server.NextFrame(() =>
{
    viewModel.AnimGraphUpdateEnabled = false; // viewModel is a CBaseViewModel
    Utilities.SetStateChanged(viewModel, "CBaseAnimGraph", "m_bAnimGraphUpdateEnabled");
});

And here's a video of the issue I'm talking about (look closely at the left hand glove or the back of the AK)

Any ideas? Not sure if there's a problem with my implementation, a bug with CSS, or it's just a CS2 problem. Or, if you know a different way to disable/pause view model animations, that would be a perfect alternate solution too. Thanks in advance.

@github-actions github-actions bot added the untriaged New issue has not been triaged label Apr 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
untriaged New issue has not been triaged
Projects
None yet
Development

No branches or pull requests

1 participant