summaryrefslogtreecommitdiff
path: root/servers/physics_2d/physics_2d_server_sw.h
diff options
context:
space:
mode:
authorPedro J. Estébanez <pedrojrulez@gmail.com>2018-08-25 00:03:26 +0200
committerPedro J. Estébanez <pedrojrulez@gmail.com>2018-08-25 00:03:26 +0200
commit6d0f4a4ad70bc20e2653c144d630f19507edb164 (patch)
treec53d59dec22c1fe47d60fa29dc4f74d14621bd13 /servers/physics_2d/physics_2d_server_sw.h
parent62233423c7310a155e8c948c053701dba248dcdb (diff)
Fix picking in CanvasLayer
New APIs in 2D physics allow intersection queries filtered by CanvasLayer object instance id. Viewport keep an inventory of its descendant CanvasLayers and takes advantage of all that to test picking with the mouse/touch position correctly transformed for each CanvasLayer.
Diffstat (limited to 'servers/physics_2d/physics_2d_server_sw.h')
-rw-r--r--servers/physics_2d/physics_2d_server_sw.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/servers/physics_2d/physics_2d_server_sw.h b/servers/physics_2d/physics_2d_server_sw.h
index d4fc44b1d7..f41c599579 100644
--- a/servers/physics_2d/physics_2d_server_sw.h
+++ b/servers/physics_2d/physics_2d_server_sw.h
@@ -144,6 +144,9 @@ public:
virtual void area_attach_object_instance_id(RID p_area, ObjectID p_ID);
virtual ObjectID area_get_object_instance_id(RID p_area) const;
+ virtual void area_attach_canvas_instance_id(RID p_area, ObjectID p_ID);
+ virtual ObjectID area_get_canvas_instance_id(RID p_area) const;
+
virtual void area_set_param(RID p_area, AreaParameter p_param, const Variant &p_value);
virtual void area_set_transform(RID p_area, const Transform2D &p_transform);
@@ -188,6 +191,9 @@ public:
virtual void body_attach_object_instance_id(RID p_body, uint32_t p_ID);
virtual uint32_t body_get_object_instance_id(RID p_body) const;
+ virtual void body_attach_canvas_instance_id(RID p_body, uint32_t p_ID);
+ virtual uint32_t body_get_canvas_instance_id(RID p_body) const;
+
virtual void body_set_continuous_collision_detection_mode(RID p_body, CCDMode p_mode);
virtual CCDMode body_get_continuous_collision_detection_mode(RID p_body) const;