Browse Source

Added accessor to get the vehicle constraint

Jorrit Rouwe 9 months ago
parent
commit
2d7176a2d2
1 changed files with 4 additions and 0 deletions
  1. 4 0
      Jolt/Physics/Vehicle/VehicleController.h

+ 4 - 0
Jolt/Physics/Vehicle/VehicleController.h

@@ -46,6 +46,10 @@ public:
 	explicit					VehicleController(VehicleConstraint &inConstraint) : mConstraint(inConstraint) { }
 	virtual						~VehicleController() = default;
 
+	/// Access the vehicle constraint that this controller is part of
+	VehicleConstraint &			GetConstraint()								{ return mConstraint; }
+	const VehicleConstraint &	GetConstraint() const						{ return mConstraint; }
+
 protected:
 	// The functions below are only for the VehicleConstraint
 	friend class VehicleConstraint;