0 votes

In a similar fashion to how Button.is_hovered() works, is there some way in the 3D engine to check if the mouse pointer is hovering over a 3D object?

For example, in a 3D scene with 2 testcubes, could I check in my script which (if any) cube my mouse is floating (hovering) over?

This seems like it should be fairly simple, but I can't find any method for this.

Thanks :)

in Engine by (328 points)

1 Answer

+1 vote

There is a demo for it.

Download demos, and see in demos/3d/mousepick_test

by (9,736 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.