diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2021-11-05 21:52:39 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-05 21:52:39 +0100 |
commit | 13aaa7312427e98661dba0183cbbee6bbc8f6542 (patch) | |
tree | 5431544904e0ced5217295f750ecabd0d24ea950 /scene/resources/skeleton_modification_2d_jiggle.cpp | |
parent | c7fefe50daebe2f3ae568baaa888ddb3cddfe5e1 (diff) | |
parent | acbd24ea842cb90ab49cd66d5dc7220e57c73f29 (diff) |
Merge pull request #54573 from nekomatata/query-parameters
Diffstat (limited to 'scene/resources/skeleton_modification_2d_jiggle.cpp')
-rw-r--r-- | scene/resources/skeleton_modification_2d_jiggle.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/scene/resources/skeleton_modification_2d_jiggle.cpp b/scene/resources/skeleton_modification_2d_jiggle.cpp index 84abc9d020..31045455a3 100644 --- a/scene/resources/skeleton_modification_2d_jiggle.cpp +++ b/scene/resources/skeleton_modification_2d_jiggle.cpp @@ -194,9 +194,13 @@ void SkeletonModification2DJiggle::_execute_jiggle_joint(int p_joint_idx, Node2D PhysicsDirectSpaceState2D *space_state = PhysicsServer2D::get_singleton()->space_get_direct_state(world_2d->get_space()); PhysicsDirectSpaceState2D::RayResult ray_result; + PhysicsDirectSpaceState2D::RayParameters ray_params; + ray_params.from = operation_bone_trans.get_origin(); + ray_params.to = jiggle_data_chain[p_joint_idx].dynamic_position; + ray_params.collision_mask = collision_mask; + // Add exception support? - bool ray_hit = space_state->intersect_ray(operation_bone_trans.get_origin(), jiggle_data_chain[p_joint_idx].dynamic_position, - ray_result, Set<RID>(), collision_mask); + bool ray_hit = space_state->intersect_ray(ray_params, ray_result); if (ray_hit) { jiggle_data_chain.write[p_joint_idx].dynamic_position = jiggle_data_chain[p_joint_idx].last_noncollision_position; |