diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2021-01-20 17:51:08 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-20 17:51:08 +0100 |
commit | b23f1a8d3ec412ffa6b7754968bdced67d7d9c8f (patch) | |
tree | aea6b706446a358d6a582f45e29c8a9b5683ea12 /scene | |
parent | 4a0abe749e619d49c3032185f4772039463ae61a (diff) | |
parent | 6bf46cf70f98aeb067f520e2084f8393b1a7c80e (diff) |
Merge pull request #45267 from HipsterPenguin/BugFixing
Fixed 6DOF set/get check for the path starting with joint_constraints
Diffstat (limited to 'scene')
-rw-r--r-- | scene/3d/physics_body_3d.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/scene/3d/physics_body_3d.cpp b/scene/3d/physics_body_3d.cpp index 5645923f22..4d712069ec 100644 --- a/scene/3d/physics_body_3d.cpp +++ b/scene/3d/physics_body_3d.cpp @@ -1716,6 +1716,10 @@ bool PhysicalBone3D::SixDOFJointData::_set(const StringName &p_name, const Varia String path = p_name; + if (!path.begins_with("joint_constraints/")) { + return false; + } + Vector3::Axis axis; { const String axis_s = path.get_slicec('/', 1); @@ -1872,6 +1876,10 @@ bool PhysicalBone3D::SixDOFJointData::_get(const StringName &p_name, Variant &r_ String path = p_name; + if (!path.begins_with("joint_constraints/")) { + return false; + } + int axis; { const String axis_s = path.get_slicec('/', 1); |