diff options
author | Hein-Pieter van Braam <hp@tmm.cx> | 2019-04-23 06:28:26 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-23 06:28:26 +0300 |
commit | bf7634b625d50a3f71e90f0b54afc0f502f95272 (patch) | |
tree | 18b46aa6f2cd674c9de4c657f8760d6eeda78cea | |
parent | 696d9d20cfecf16876be13a2106c40ffdbdac0e0 (diff) | |
parent | 33a541727a09d3607a08f632f0c0031ffc94f19e (diff) |
Merge pull request #25155 from Timofffee/Timofffee-patch-vehicle
Added check engine_traction
-rw-r--r-- | scene/3d/vehicle_body.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/3d/vehicle_body.cpp b/scene/3d/vehicle_body.cpp index c7f7b14a8f..fde135c972 100644 --- a/scene/3d/vehicle_body.cpp +++ b/scene/3d/vehicle_body.cpp @@ -716,7 +716,7 @@ void VehicleBody::_update_friction(PhysicsDirectBodyState *s) { real_t rollingFriction = 0.f; if (wheelInfo.m_raycastInfo.m_isInContact) { - if (engine_force != 0.f) { + if (engine_force != 0.f && wheelInfo.engine_traction != false) { rollingFriction = -engine_force * s->get_step(); } else { real_t defaultRollingFrictionImpulse = 0.f; |