slomal bahui

This commit is contained in:
Никита Круглицкий
2025-05-14 18:57:41 +06:00
parent 6a128f470b
commit 138d91b9f9
12 changed files with 233 additions and 86 deletions

View File

@@ -3,10 +3,10 @@ local FrictionPreset = class('FrictionPreset')
function FrictionPreset:initialize(config)
config = config or {}
self.B = config.B or 11
self.C = config.C or 1.15
self.D = config.D or 1.03
self.E = config.E or -10
self.B = config.B or 10.86
self.C = config.C or 2.15
self.D = config.D or 0.933
self.E = config.E or 0.992
end
function FrictionPreset:evaluate(slip)

View File

@@ -201,7 +201,7 @@ function Wheel:selfAligningTorque(Sy, load)
return Mz
end
function Wheel:rotateVector(vector)
function Wheel:rotateVector(vector, jopa)
local ang = self.entity:getAngles()
local baseForward = ang:getForward()
local baseUp = ang:getUp()
@@ -229,9 +229,9 @@ function Wheel:update()
self.lateralLoadCoefficient = self:getLateralLoadCoefficient(self.load * 1000)
local ang = self.entity:getAngles()
local baseForward = ang:getForward()
local baseForward = ang:getForward() * self.direction
local baseUp = ang:getUp()
local baseRight = -ang:getRight()
local baseRight = -ang:getRight() * self.direction
self.forward = self:rotateVector(baseForward)
self.right = self:rotateVector(baseRight)