summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2016-01-10 15:54:57 -0300
committerJuan Linietsky <reduzio@gmail.com>2016-01-10 15:54:57 -0300
commit1aaf507ffb9b96627219d1e6f4ca1f22565e06b8 (patch)
tree3d0e7f836918f8c54f6576cc5f2d20d3ec52d33c /scene
parent729ab84a49fb69aed25e6986828f727ad8b18691 (diff)
change intersect_ray function to discriminate pickable objects, fixes #3203
Diffstat (limited to 'scene')
-rw-r--r--scene/main/viewport.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp
index 6d18a53c9f..330f855006 100644
--- a/scene/main/viewport.cpp
+++ b/scene/main/viewport.cpp
@@ -577,7 +577,7 @@ void Viewport::_notification(int p_what) {
PhysicsDirectSpaceState *space = PhysicsServer::get_singleton()->space_get_direct_state(find_world()->get_space());
if (space) {
- bool col = space->intersect_ray(from,from+dir*10000,result,Set<RID>(),0xFFFFFFFF,0xFFFFFFFF);
+ bool col = space->intersect_ray(from,from+dir*10000,result,Set<RID>(),0xFFFFFFFF,0xFFFFFFFF,true);
ObjectID new_collider=0;
if (col) {
@@ -617,7 +617,7 @@ void Viewport::_notification(int p_what) {
PhysicsDirectSpaceState *space = PhysicsServer::get_singleton()->space_get_direct_state(find_world()->get_space());
if (space) {
- bool col = space->intersect_ray(from,from+dir*10000,result,Set<RID>(),0xFFFFFFFF,0xFFFFFFFF);
+ bool col = space->intersect_ray(from,from+dir*10000,result,Set<RID>(),0xFFFFFFFF,0xFFFFFFFF,true);
ObjectID new_collider=0;
if (col) {
if (result.collider) {