since I'm using ECS, what should I change (in InputSystem) when an input is received: velocity, acceleration or it doesnt really matter (since theyre all going to be changed on the MotionSystem)?
I'd say your input system should focus on applying accelerations or forces. Then your movement or physics system can handle the integration of forces/accelerations into velocity and into displacement.
Sort of like having a standard interface - you know everything's working consistently without having to hold the code from all the other systems in your mind at once.
If they're all just applying accelerations, it's predictable, and you probably don't have to worry too much about update order and such.
Depending on your complexity, you might also want to separate your Input system (reading player commands out of input devices) from your Character Control system (turning commands into movement of an avatar)
Forces can be vectors or scalars. With speed/velocity, we have different names for the scalar measure (speed) and the vector (velocity). But for forces we usually use the word "force" for both.
In dimensional analysis, you do math on the units themselves. Going back to the "60 miles per hour times 0.5 hours" example, we neglect the numbers and just look at the units: (mi/h)*h
We can see the h in the denominator cancels out with the h we're multiplying by, leaving us with just m - and that's how we can confirm that expression computes a length.
Are you re-zeroing your acceleration at the start of each simulation step?
It's generally not something you want to accumulate frame over frame, the way we do with velocity
You'll notice in the version I showed you yesterday, all my acceleration values were either input parameters or temporaries. Only velocity and position were persistent between simulation frames.
Here, this is an input parameter. Something the designer tunes to decide the feel the character should have.
If you like though, we can change the input parameters to something like "maxSpeed" and "timeToMaxSpeed" and then solve an equation to find a force that achieves that speed in that time.
I did. So next we need to know the friction model you're using and the typical baseline friction values to expect. (This is why I said I prefer not to go the force route - it makes achieving a particular max speed much more complicated than the alternative I showed you)