diff options
author | HipsterPenguin <38148386+HipsterPenguin@users.noreply.github.com> | 2021-01-17 13:25:34 -0600 |
---|---|---|
committer | HipsterPenguin <38148386+HipsterPenguin@users.noreply.github.com> | 2021-01-19 06:40:06 -0600 |
commit | 6bf46cf70f98aeb067f520e2084f8393b1a7c80e (patch) | |
tree | 46979e805d4719a7452b0683b30316042dae066a | |
parent | 7dea83c623eded9ddcdbbb0bbaa7e8229c5ec74f (diff) |
Fixed 6DOF set/get check for the path starting with joint_constraints
New code checks whether or not property has joint_constraints as the first part of its path.
-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); |