浏览代码

Added VehicleController::GetMaxPitchRollAngle / GetVehicleCollisionTester

Fixes #1736
Jorrit Rouwe 2 周之前
父节点
当前提交
349c650619
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      Jolt/Physics/Vehicle/VehicleConstraint.h

+ 2 - 0
Jolt/Physics/Vehicle/VehicleConstraint.h

@@ -74,9 +74,11 @@ public:
 
 	/// Defines the maximum pitch/roll angle (rad), can be used to avoid the car from getting upside down. The vehicle up direction will stay within a cone centered around the up axis with half top angle mMaxPitchRollAngle, set to pi to turn off.
 	void						SetMaxPitchRollAngle(float inMaxPitchRollAngle) { mCosMaxPitchRollAngle = Cos(inMaxPitchRollAngle); }
+	float						GetMaxPitchRollAngle() const				{ return ACos(mCosMaxPitchRollAngle); }
 
 	/// Set the interface that tests collision between wheel and ground
 	void						SetVehicleCollisionTester(const VehicleCollisionTester *inTester) { mVehicleCollisionTester = inTester; }
+	const VehicleCollisionTester *GetVehicleCollisionTester() const			{ return mVehicleCollisionTester; }
 
 	/// Callback function to combine the friction of a tire with the friction of the body it is colliding with.
 	/// On input ioLongitudinalFriction and ioLateralFriction contain the friction of the tire, on output they should contain the combined friction with inBody2.