#Why isn't this movement system smooth?
30 messages · Page 1 of 1 (latest)
have you tried running it in the FixedUpdate schedule?
No but I think that would make it worse since I'm multiplying by delta time.
you are still supposed to do that if it's in fixed update, but it's just always be the same amount of time
it prevents floating point error from causing changes
that might not be the issue here, but that's the first thing that comes to mind
Isn't the point of FixedUpdate that the time between frames is fixed?
yes, having a fixed time-step prevents floating point error from causing it to be non-deterministic
again, i don't really know if that is the issue here, but that is the first thing that comes to mind without seeing the rest of your code
There's not much else to see. I'm just inserting the TIme resource and a Bullet with that system
you're inserting the time resource yourself? it should already be inserted if you add the DefaultPlugins. Maybe the one you're inserting is different than the default?
Oh, I am using the default plugins.. I'll remove my own insertion of it.
Hmm.. that does actually seem better.
when you ask for help, it's usually best to show a minimal complete example of your code, if you have very little code because you're just getting started, then you can show it all
Maybe part of it is also just that bevy starts up and it hasn't quite settled... (it only stays on the screen for about 1.5 seconds)
Thanks!
thats very possible
longshot but are you using avian as well for physics or just this translation here?
wondering if it could be some weird interpolation thing but probs not.
@west moat no, just Bevy. One thing that seemed to help was switching to release builds
its smooth enough to the point its fine now
oh, did you follow the official bevy setup guide?
yes
It tells you to add a section to cargo.toml that increases the opt-level for Bevy to release levels, while keeping it at debug levels for faster compiles for your game code
do you have that?
yup
and still it was laggy on debug but is better on release?
honestly not sure, but its acceptable now i think
because using that config the only difference building in release is optimizing your own code, since all dependencies are already at release levels of optimization. So maybe the stutter is actually just some other system you wrote running slowly/unevenly and your fps being low or unstable?
im not sure what made the difference in the end, maybe just letting it run longer