Added check engine_traction

This commit is contained in:
George Linkovsky 2019-01-20 09:21:54 +04:00 committed by GitHub
parent 7f9209781c
commit 33a541727a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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;