Skip to content

Commit 74aeab5

Browse files
committed
Increase size of WorldBoundaryShape to be much larger
The size was previously 20,000 pixels or units, which could be easily reached in many projects. It is now 2,000,000,000,000,000 pixels or units, which is larger than the supported coordinate space with a single-precision build, and still very large in a double precision build.
1 parent 4728ff3 commit 74aeab5

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

servers/physics_2d/godot_shape_2d.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ void GodotWorldBoundaryShape2D::set_data(const Variant &p_data) {
123123
ERR_FAIL_COND(arr.size() != 2);
124124
normal = arr[0];
125125
d = arr[1];
126-
configure(Rect2(Vector2(-1e4, -1e4), Vector2(1e4 * 2, 1e4 * 2)));
126+
configure(Rect2(Vector2(-1e15, -1e15), Vector2(1e15 * 2, 1e15 * 2)));
127127
}
128128

129129
Variant GodotWorldBoundaryShape2D::get_data() const {

servers/physics_3d/godot_shape_3d.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ Vector3 GodotWorldBoundaryShape3D::get_moment_of_inertia(real_t p_mass) const {
152152

153153
void GodotWorldBoundaryShape3D::_setup(const Plane &p_plane) {
154154
plane = p_plane;
155-
configure(AABB(Vector3(-1e4, -1e4, -1e4), Vector3(1e4 * 2, 1e4 * 2, 1e4 * 2)));
155+
configure(AABB(Vector3(-1e15, -1e15, -1e15), Vector3(1e15 * 2, 1e15 * 2, 1e15 * 2)));
156156
}
157157

158158
void GodotWorldBoundaryShape3D::set_data(const Variant &p_data) {

0 commit comments

Comments
 (0)