summaryrefslogtreecommitdiff
path: root/scene/resources/world_2d.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/resources/world_2d.cpp')
-rw-r--r--scene/resources/world_2d.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/scene/resources/world_2d.cpp b/scene/resources/world_2d.cpp
index 0dd6a3d5e7..43a7af4bfd 100644
--- a/scene/resources/world_2d.cpp
+++ b/scene/resources/world_2d.cpp
@@ -352,8 +352,17 @@ void World2D::_bind_methods() {
ObjectTypeDB::bind_method(_MD("get_canvas"),&World2D::get_canvas);
ObjectTypeDB::bind_method(_MD("get_space"),&World2D::get_space);
ObjectTypeDB::bind_method(_MD("get_sound_space"),&World2D::get_sound_space);
+
+ ObjectTypeDB::bind_method(_MD("get_direct_space_state:Physics2DDirectSpaceState"),&World2D::get_direct_space_state);
+
+}
+
+Physics2DDirectSpaceState *World2D::get_direct_space_state() {
+
+ return Physics2DServer::get_singleton()->space_get_direct_state(space);
}
+
World2D::World2D() {
canvas = VisualServer::get_singleton()->canvas_create();