mirror of
https://github.com/godotengine/godot.git
synced 2025-02-11 22:35:15 +08:00
Merge pull request #25155 from Timofffee/Timofffee-patch-vehicle
Added check engine_traction
This commit is contained in:
commit
bf7634b625
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user