diff options
| author | Juan Linietsky | 2015-03-22 09:40:26 -0300 |
|---|---|---|
| committer | Juan Linietsky | 2015-03-22 09:40:26 -0300 |
| commit | dac2017dee8a58c85b8b3218a779260d3b5f4072 (patch) | |
| tree | 9fd691bb3a73c10558a33306956f932342201e6b /scene/resources/world.cpp | |
| parent | c6c72a3c37a44964ec8e6b3353f78635bf588eab (diff) | |
| download | godot-dac2017dee8a58c85b8b3218a779260d3b5f4072.tar.gz godot-dac2017dee8a58c85b8b3218a779260d3b5f4072.tar.zst godot-dac2017dee8a58c85b8b3218a779260d3b5f4072.zip | |
fixes/cleans up
-input now correctly works when using viewport scaling
-added function to get areas/bodies in given point
-added function to get space state directly from world
Diffstat (limited to 'scene/resources/world.cpp')
| -rw-r--r-- | scene/resources/world.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/scene/resources/world.cpp b/scene/resources/world.cpp index 880a3a32e..30cf58bdd 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")); } |
