Update inputevent.rst (#5043)

* Update inputevent.rst

Added object picking must be turned on in viewport properties

Add project settings reference

Co-authored-by: Max Hilbrunner <mhilbrunner@users.noreply.github.com>
This commit is contained in:
cosmicr
2021-07-06 11:23:53 +10:00
committed by GitHub
parent 9d6d390216
commit 9b2d058da2

View File

@@ -95,8 +95,8 @@ received input, in order:
If any function consumes the event, it can call :ref:`SceneTree.set_input_as_handled() <class_SceneTree_method_set_input_as_handled>`, and the
event will not spread any more. The unhandled input callback is ideal for full-screen gameplay events, so they are not received when a GUI is active.
4. If no one wanted the event so far, and a :ref:`Camera <class_Camera>` is assigned
to the Viewport, a ray to the physics world (in the ray direction from
the click) will be cast. If this ray hits an object, it will call the
to the Viewport with :ref:`Object Picking <class_viewport_property_physics_object_picking>` turned on, a ray to the physics world (in the ray direction from
the click) will be cast. (For the root viewport, this can also be enabled in :ref:`Project Settings <class_ProjectSettings_property_physics/common/enable_object_picking>`) If this ray hits an object, it will call the
:ref:`CollisionObject._input_event() <class_CollisionObject_method__input_event>` function in the relevant
physics object (bodies receive this callback by default, but areas do
not. This can be configured through :ref:`Area <class_Area>` properties).