瀏覽代碼

Fix nan errors when using VehicleBody

(cherry picked from commit 1b8cbcf94648b7baeb3def5464f6f67509081134)
Rafał Mikrut 4 年之前
父節點
當前提交
24d03afc9b
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      scene/3d/vehicle_body.cpp

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

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