Open v-rob opened 6 years ago
Does it happen with the current HEAD? Please keep in mind that for performance reasons, boost_cart and the MTG carts only update the velocity, acceleration and position each node (or server step, depending on what's larger).
Just a note: this still happens. I think I've identified the problem, however. This code:
only limits the acceleration if the cart is currently going faster than it should once per node. However, acceleration is not limited otherwise and is set with set_acceleration
. So, when going at a max_speed
of 1, the acceleration is only limited once every node, so the cart can speed up in between nodes. So, the solution would be something like making the speed check happen every on_step
instead of once per node.
If you set boost_cart.speed_max to a low value such as 1 and push the cart up/down a hill, the cart will move slightly faster than the max speed in some places, but at other points on the slope, it will move the normal speed.
I used a slope that went up three nodes with powered rail. If the powered rail's acceleration is set to a very large value, like 500, then the jerking movement is much more apparent.