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

Interaction between ManualControl and Update/FixedUpdate #588

Open
cBournhonesque opened this issue Aug 9, 2024 · 0 comments
Open

Interaction between ManualControl and Update/FixedUpdate #588

cBournhonesque opened this issue Aug 9, 2024 · 0 comments
Labels
bug Something isn't working documentation Improvements or additions to documentation

Comments

@cBournhonesque
Copy link
Contributor

What you did

I have a system that handles an Action in FixedUpdate because the action must be frame-time insensitive (also because of networking).
I try to set the action manually in PreUpdate during ManualControl.

I network my actions using ActionDiffs that are generated in FixedUpdate, bceause I need tick information.

But then the ActionData becomes

value: 0.0
update_value: 13.4
fixed_update_value: 0.0

i.e. since I set the Action value manually in PreUpdate, it only updates the update_value and not the fixed_update_value; so I cannot generate accurate diffs from it.

I'm not sure if it's a bug in lightyear, a bug in leafwing or just expected but I think it might be helpful to bring it up.

Solution

The solution was to put my system that manually updates the ActionState in FixedPreUpdate, so that the ActionDiffs are generated correctly

@cBournhonesque cBournhonesque added the bug Something isn't working label Aug 9, 2024
@alice-i-cecile alice-i-cecile added the documentation Improvements or additions to documentation label Aug 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants