Refactored vehicle components

This commit is contained in:
Nikita Kruglickiy
2022-07-28 15:44:31 +03:00
parent 7cdb222580
commit b4dccd73a6
11 changed files with 485 additions and 523 deletions

View File

@@ -5,3 +5,13 @@ function getLocalVelocity(entity)
return entity:worldToLocal(entity:getVelocity() + entity:getPos())
end
function calculateWheelInertia(entity)
if not isValid(entity) then
return Vector(0)
end
local originalInertia = entity:getInertia()
return Vector(originalInertia)
end