summaryrefslogtreecommitdiff
path: root/modules/bullet/generic_6dof_joint_bullet.cpp
diff options
context:
space:
mode:
authorAndrea Catania <info@andreacatania.com>2018-11-27 07:11:28 +0100
committerAndrea Catania <info@andreacatania.com>2018-11-27 07:11:28 +0100
commita395d809a5bc40ff4aef607025db40c84abfac83 (patch)
tree4bca2f469a38af4d6015c90308e58c4cbd3af040 /modules/bullet/generic_6dof_joint_bullet.cpp
parent631cf676c34e8add973236112251aeb622807e4c (diff)
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.cpp8
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();
+}