Skip to content

Commit

Permalink
Added accessor to get the vehicle constraint
Browse files Browse the repository at this point in the history
  • Loading branch information
jrouwe committed Nov 7, 2024
1 parent 92aa4c2 commit 2d7176a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Jolt/Physics/Vehicle/VehicleController.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ class JPH_EXPORT VehicleController : public RefTarget<VehicleController>, 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;
Expand Down

0 comments on commit 2d7176a

Please sign in to comment.