Browse Source

Merge pull request #45803 from qarmin/unitialized_vehicle

Fix nan errors when using VehicleBody
Rémi Verschelde 4 years ago
parent
commit
57c03a432a
1 changed files with 1 additions and 0 deletions
  1. 1 0
      scene/3d/vehicle_body_3d.cpp

+ 1 - 0
scene/3d/vehicle_body_3d.cpp

@@ -366,6 +366,7 @@ VehicleWheel3D::VehicleWheel3D() {
 	m_suspensionRelativeVelocity = 0;
 	m_clippedInvContactDotSuspension = 1.0;
 	m_raycastInfo.m_isInContact = false;
+	m_raycastInfo.m_suspensionLength = 0.0;
 
 	body = nullptr;
 }