summaryrefslogtreecommitdiff
path: root/scene/3d
diff options
context:
space:
mode:
authorGeorge Linkovsky <Timofffee@users.noreply.github.com>2019-01-20 09:21:54 +0400
committerGitHub <noreply@github.com>2019-01-20 09:21:54 +0400
commit33a541727a09d3607a08f632f0c0031ffc94f19e (patch)
tree7a612c884dca0c6eb2acd284cf623e9e6c72bb4f /scene/3d
parent7f9209781cea7148934a5e48c5c14167ce256cc8 (diff)
Added check engine_traction
Diffstat (limited to 'scene/3d')
-rw-r--r--scene/3d/vehicle_body.cpp2
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;