Skip to content

Commit

Permalink
Fixed swing type not being set in SixDOFConstraint::GetConstraintSett…
Browse files Browse the repository at this point in the history
…ings and SwingTwistConstraint::GetConstraintSettings
  • Loading branch information
jrouwe committed Dec 20, 2023
1 parent 9d7748e commit 46a90f4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions Jolt/Physics/Constraints/SixDOFConstraint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -828,6 +828,7 @@ Ref<ConstraintSettings> SixDOFConstraint::GetConstraintSettings() const
settings->mPosition2 = RVec3(mLocalSpacePosition2);
settings->mAxisX2 = mConstraintToBody2.RotateAxisX();
settings->mAxisY2 = mConstraintToBody2.RotateAxisY();
settings->mSwingType = mSwingTwistConstraintPart.GetSwingType();
memcpy(settings->mLimitMin, mLimitMin, sizeof(mLimitMin));
memcpy(settings->mLimitMax, mLimitMax, sizeof(mLimitMax));
memcpy(settings->mMaxFriction, mMaxFriction, sizeof(mMaxFriction));
Expand Down
1 change: 1 addition & 0 deletions Jolt/Physics/Constraints/SwingTwistConstraint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -502,6 +502,7 @@ Ref<ConstraintSettings> SwingTwistConstraint::GetConstraintSettings() const
settings->mPosition2 = RVec3(mLocalSpacePosition2);
settings->mTwistAxis2 = mConstraintToBody2.RotateAxisX();
settings->mPlaneAxis2 = mConstraintToBody2.RotateAxisZ();
settings->mSwingType = mSwingTwistConstraintPart.GetSwingType();
settings->mNormalHalfConeAngle = mNormalHalfConeAngle;
settings->mPlaneHalfConeAngle = mPlaneHalfConeAngle;
settings->mTwistMinAngle = mTwistMinAngle;
Expand Down

0 comments on commit 46a90f4

Please sign in to comment.