소스 검색

Added check engine_traction

George Linkovsky 6 년 전
부모
커밋
33a541727a
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      scene/3d/vehicle_body.cpp

+ 1 - 1
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;