How I can get position of canvasTexture by raycast on 3d object

The following official example might be helpful to you:

https://threejs.org/examples/webgl_raycast_texture

When raycasting against a mesh, you can retrieve the texture coordinates of the intersection point (if the respective geometry has uv data). When applying a canvas element as a texture, you can then use these texture coordinates to draw something on it. Like the cross in the example.

2 Likes