diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2018-11-28 10:30:47 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-28 10:30:47 +0100 |
commit | 78cdbc54b0c77b0a860a6d55d4604baee97666f2 (patch) | |
tree | 19bcff0348204494cb727a27132c6110760e9224 /modules/bullet/generic_6dof_joint_bullet.cpp | |
parent | 3f41bd1522d562b72865879bd0f79c281249acca (diff) | |
parent | a395d809a5bc40ff4aef607025db40c84abfac83 (diff) |
Merge pull request #23994 from AndreaCatania/prec
Added function to control 6DOF precision
Diffstat (limited to 'modules/bullet/generic_6dof_joint_bullet.cpp')
-rw-r--r-- | modules/bullet/generic_6dof_joint_bullet.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/modules/bullet/generic_6dof_joint_bullet.cpp b/modules/bullet/generic_6dof_joint_bullet.cpp index a94b88d566..812dcd2d56 100644 --- a/modules/bullet/generic_6dof_joint_bullet.cpp +++ b/modules/bullet/generic_6dof_joint_bullet.cpp @@ -265,3 +265,11 @@ bool Generic6DOFJointBullet::get_flag(Vector3::Axis p_axis, PhysicsServer::G6DOF ERR_FAIL_INDEX_V(p_axis, 3, false); return flags[p_axis][p_flag]; } + +void Generic6DOFJointBullet::set_precision(int p_precision) { + sixDOFConstraint->setOverrideNumSolverIterations(MAX(1, p_precision)); +} + +int Generic6DOFJointBullet::get_precision() const { + return sixDOFConstraint->getOverrideNumSolverIterations(); +} |