From a395d809a5bc40ff4aef607025db40c84abfac83 Mon Sep 17 00:00:00 2001 From: Andrea Catania Date: Tue, 27 Nov 2018 07:11:28 +0100 Subject: Added function to control 6DOF precision --- modules/bullet/generic_6dof_joint_bullet.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'modules/bullet/generic_6dof_joint_bullet.cpp') 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(); +} -- cgit v1.2.3