summaryrefslogtreecommitdiff
path: root/scene/resources/world_2d.cpp
diff options
context:
space:
mode:
authorCarl Olsson <carl.olsson@gmail.com>2015-03-23 08:19:20 +1000
committerCarl Olsson <carl.olsson@gmail.com>2015-03-23 08:19:20 +1000
commitfb2cdfe7edcc2ccafea7604afd104f582e5b9c17 (patch)
treed9555d9519648f95d7ed3663fbca50978bb12a1f /scene/resources/world_2d.cpp
parent41686d5fdd0d72f167894f976d19b177789f1f63 (diff)
parente9f94ce8d2cc6805e74fffdf733e6dc5b5c530f5 (diff)
Merge branch 'master' of https://github.com/not-surt/godot into snapping2
Conflicts: tools/editor/plugins/canvas_item_editor_plugin.cpp tools/editor/plugins/canvas_item_editor_plugin.h
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();