mirror of
https://github.com/SmallJoker/boost_cart.git
synced 2024-11-27 17:03:44 +01:00
Revert velocity calculation change from e3688b5
Accelerates carts too much when going up/downhill Caused by wrong vector length calculation. This will need to be altered again if there will be 45° rails
This commit is contained in:
parent
49028ca123
commit
57d09fac79
@ -232,7 +232,7 @@ function cart_entity:on_step(dtime)
|
||||
else
|
||||
-- Direction change detected
|
||||
if dir_changed then
|
||||
vel = vector.multiply(dir, v3_len(vel))
|
||||
vel = vector.multiply(dir, math.abs(vel.x + vel.z))
|
||||
update.vel = true
|
||||
if dir.y ~= self.old_dir.y then
|
||||
pos = vector.round(pos)
|
||||
|
Loading…
Reference in New Issue
Block a user