You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Manjaro Linux (6.0.2-2-MANJARO x86_64) Vulkan, GTX 2060 SUPER with proprietary drivers
Issue description
If a CollisionObject3D has input_capture_on_drag set to true the emitted input_event signals only report correct position and normal on mouse button click.
On mouse button release or mouse motion both position and normal are always reported as (0,0,0), even if the mouse pointer is on top of the collider.
I'm not familiar with the code but I assume the problem is here:
The Vector3(), Vector3() should be the correct values only when dragging or releasing outside the collider but no ray is being cast.
Some additional issues:
If capture is enabled, mouse_exited is not emitted when the mouse leaves the collider, only when the mouse button is released. If this is expected I'll open a godot documentation issue
The auto generated callback for input_event uses position as a parameter name which will always collide with Node3D.position
Steps to reproduce
Run the MRP
Click, drag and release inside the sphere on the right
Expected: The text at the bottom should show valid position and normal
Actual: (0,0,0) is reported when it shouldn't
I'm not familiar with the code but I assume the problem is here
Thanks for identifying the correct location in the source code.
If capture is enabled, mouse_exited is not emitted when the mouse leaves the collider, only when the mouse button is released. If this is expected I'll open a godot documentation issue
This sounds like the same problem as we currently have for 2D: #20881, which might get solved by #67791
I believe, that it is reasonable to keep the behavior consistent in 2D and 3D.
The auto generated callback for input_event uses position as a parameter name which will always collide with Node3D.position
Instead of position which is guaranteed to collide it can be something like hit_position (and maybe hit_normal for consistency).
It's a really minor annoyance since it's just the default parameter name in the editor-generated callback so the user can just go and change it to something different or leave it as is if he doesn't intend to read/write to Node3D::position. It might confuse newbie users though.
Godot version
v4.0.beta3.official [01ae26d]
System information
Manjaro Linux (6.0.2-2-MANJARO x86_64) Vulkan, GTX 2060 SUPER with proprietary drivers
Issue description
If a CollisionObject3D has
input_capture_on_drag
set totrue
the emittedinput_event
signals only report correct position and normal on mouse button click.On mouse button release or mouse motion both position and normal are always reported as (0,0,0), even if the mouse pointer is on top of the collider.
I'm not familiar with the code but I assume the problem is here:
godot/scene/main/viewport.cpp
Line 704 in 11e1bac
The Vector3(), Vector3() should be the correct values only when dragging or releasing outside the collider but no ray is being cast.
Some additional issues:
position
as a parameter name which will always collide with Node3D.positionSteps to reproduce
Expected: The text at the bottom should show valid position and normal
Actual: (0,0,0) is reported when it shouldn't
Minimal reproduction project
CaptureOnDragNormalMRP.zip
The text was updated successfully, but these errors were encountered: