We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Your examples for BaseSystem doesn't include how to use deltatime
You can't just use deltaTime from the outer scope due to it not being valid in the lambda.
using Arch.Core; using Arch.System; using MineClone.Components; namespace MineClone.Systems; public class MovementSystem(World world) : BaseSystem<World, float>(world) { private QueryDescription _description = new QueryDescription().WithAll<Position, Velocity>(); public override void Update(in float delta) { base.Update(in delta); World.Query(in _description, (ref Position position, ref Velocity velocity) => { position.Value += velocity.Value * delta; // cannot use in parameter delta }); } }
The text was updated successfully, but these errors were encountered:
Copy it to a local
float localDeltaTime = deltaTime;
And use that instead. I know it's arch here and not you, but in here at all feels strange.
in
Sorry, something went wrong.
No branches or pull requests
Your examples for BaseSystem doesn't include how to use deltatime
You can't just use deltaTime from the outer scope due to it not being valid in the lambda.
The text was updated successfully, but these errors were encountered: