How to get the position of the mouse on the texture of a mesh

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Stefoto

So I`m trying to figure out how to make a texture editor for meshes and to do this I gotta get the 2D pixel position on the texture of the mesh that the mouse is hovering over so I can then edit it and such.
In other words like the Human fall flat character editor where you can draw on the mesh and edit its texture.

You can use a raycast3D to get the global 3d position of where the mouse hovering. I feel like that’s a start. You’d probably have to read up on geometry to figure out the rest.

SweetPie | 2022-08-22 22:21

for 3d
example : Statickbody , use signal

func _on_Statickbody_input_event(camera, event, position, normal, shape_idx):

as SweetPie said

ramazan | 2022-08-23 07:58