summaryrefslogtreecommitdiff
path: root/servers/physics_server_3d.cpp
diff options
context:
space:
mode:
authorRicardo Buring <ricardo.buring@gmail.com>2023-03-23 15:59:41 +0100
committerYuri Sizov <yuris@humnom.net>2023-03-27 17:50:35 +0200
commit58d8368481813398aab77717a59461c3b79e3a2d (patch)
treec269ccdb11fc61fb79c81b77fc39cf618632dd5c /servers/physics_server_3d.cpp
parent2a52307936f11aede9c8968f8c02c8e8f9ee29e1 (diff)
Fix collide_shape return type
Fix PhysicsDirectSpaceState3D::_collide_shape return type. Also PhysicsDirectSpaceState2D::_collide_shape. (cherry picked from commit 61429a5f49f2509f631703886b8b3234701a0206)
Diffstat (limited to 'servers/physics_server_3d.cpp')
-rw-r--r--servers/physics_server_3d.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/servers/physics_server_3d.cpp b/servers/physics_server_3d.cpp
index c9cf8f99af..9495ce2262 100644
--- a/servers/physics_server_3d.cpp
+++ b/servers/physics_server_3d.cpp
@@ -429,17 +429,17 @@ Vector<real_t> PhysicsDirectSpaceState3D::_cast_motion(const Ref<PhysicsShapeQue
return ret;
}
-TypedArray<PackedVector3Array> PhysicsDirectSpaceState3D::_collide_shape(const Ref<PhysicsShapeQueryParameters3D> &p_shape_query, int p_max_results) {
- ERR_FAIL_COND_V(!p_shape_query.is_valid(), Array());
+TypedArray<Vector3> PhysicsDirectSpaceState3D::_collide_shape(const Ref<PhysicsShapeQueryParameters3D> &p_shape_query, int p_max_results) {
+ ERR_FAIL_COND_V(!p_shape_query.is_valid(), TypedArray<Vector3>());
Vector<Vector3> ret;
ret.resize(p_max_results * 2);
int rc = 0;
bool res = collide_shape(p_shape_query->get_parameters(), ret.ptrw(), p_max_results, rc);
if (!res) {
- return TypedArray<PackedVector3Array>();
+ return TypedArray<Vector3>();
}
- TypedArray<PackedVector3Array> r;
+ TypedArray<Vector3> r;
r.resize(rc * 2);
for (int i = 0; i < rc * 2; i++) {
r[i] = ret[i];