summaryrefslogtreecommitdiff
path: root/scene/resources/world.cpp
diff options
context:
space:
mode:
authorAnton Yabchinskiy <arn@bestmx.ru>2015-04-04 09:31:21 +0300
committerAnton Yabchinskiy <arn@bestmx.ru>2015-04-04 09:31:21 +0300
commit16746f157f83d666079ba3266acec13d35b84c3f (patch)
tree8c872d18ccdef90a15e72622cd0139e0e64801a6 /scene/resources/world.cpp
parent43713810deaadfec6a1656767cf5520073e58a06 (diff)
parent5d99e15e43d5a446b35d48e8a3b08a478f1998a9 (diff)
Merge branch 'master' of github.com:okamstudio/godot
Diffstat (limited to 'scene/resources/world.cpp')
-rw-r--r--scene/resources/world.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/scene/resources/world.cpp b/scene/resources/world.cpp
index 880a3a32e3..30cf58bdd8 100644
--- a/scene/resources/world.cpp
+++ b/scene/resources/world.cpp
@@ -307,6 +307,11 @@ Ref<Environment> World::get_environment() const {
}
+PhysicsDirectSpaceState *World::get_direct_space_state() {
+
+ return PhysicsServer::get_singleton()->space_get_direct_state(space);
+}
+
void World::_bind_methods() {
ObjectTypeDB::bind_method(_MD("get_space"),&World::get_space);
@@ -314,6 +319,7 @@ void World::_bind_methods() {
ObjectTypeDB::bind_method(_MD("get_sound_space"),&World::get_sound_space);
ObjectTypeDB::bind_method(_MD("set_environment","env:Environment"),&World::set_environment);
ObjectTypeDB::bind_method(_MD("get_environment:Environment"),&World::get_environment);
+ ObjectTypeDB::bind_method(_MD("get_direct_space_state:PhysicsDirectSpaceState"),&World::get_direct_space_state);
ADD_PROPERTY(PropertyInfo(Variant::OBJECT,"environment",PROPERTY_HINT_RESOURCE_TYPE,"Environment"),_SCS("set_environment"),_SCS("get_environment"));
}