summaryrefslogtreecommitdiff
path: root/scene/3d/spring_arm_3d.cpp
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2020-05-04 16:37:40 +0200
committerGitHub <noreply@github.com>2020-05-04 16:37:40 +0200
commit878adb22b72d3442c7edd7de9a9b3f0348524d2f (patch)
tree0e4fd619aafd0d6a99c37707f75f9dfb1d6107d5 /scene/3d/spring_arm_3d.cpp
parent560510b93b0c4b4dc40ce0599695504c4b2155fb (diff)
parent559bc3ca87042d477331ecd32f1881ce8d0b5d91 (diff)
Merge pull request #37717 from qarmin/world_fix
Change non-existent World to World3D
Diffstat (limited to 'scene/3d/spring_arm_3d.cpp')
-rw-r--r--scene/3d/spring_arm_3d.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/scene/3d/spring_arm_3d.cpp b/scene/3d/spring_arm_3d.cpp
index 0ffde7aa8f..1410b730fd 100644
--- a/scene/3d/spring_arm_3d.cpp
+++ b/scene/3d/spring_arm_3d.cpp
@@ -147,7 +147,7 @@ void SpringArm3D::process_spring() {
if (shape.is_null()) {
motion = Vector3(cast_direction * (spring_length));
PhysicsDirectSpaceState3D::RayResult r;
- bool intersected = get_world()->get_direct_space_state()->intersect_ray(get_global_transform().origin, get_global_transform().origin + motion, r, excluded_objects, mask);
+ bool intersected = get_world_3d()->get_direct_space_state()->intersect_ray(get_global_transform().origin, get_global_transform().origin + motion, r, excluded_objects, mask);
if (intersected) {
float dist = get_global_transform().origin.distance_to(r.position);
dist -= margin;
@@ -155,7 +155,7 @@ void SpringArm3D::process_spring() {
}
} else {
motion = Vector3(cast_direction * spring_length);
- get_world()->get_direct_space_state()->cast_motion(shape->get_rid(), get_global_transform(), motion, 0, motion_delta, motion_delta_unsafe, excluded_objects, mask);
+ get_world_3d()->get_direct_space_state()->cast_motion(shape->get_rid(), get_global_transform(), motion, 0, motion_delta, motion_delta_unsafe, excluded_objects, mask);
}
current_spring_length = spring_length * motion_delta;