Search Unity

from 3d coordinates to pixel coordinate of an image in a canvas group

Discussion in 'Editor & General Support' started by dannox, Feb 11, 2019.

  1. dannox

    dannox

    Joined:
    Oct 20, 2010
    Posts:
    12
    Hi,
    the problem is that I have this image on a panel and everything is treated as a GUI in a VR context.
    I need to select a part of this image in order to change pixel colors, and the selection comes with a ray that pops out from the right remote controller. If I use RaycastHit I'm able to get the 3D point, but then I don't know how to get the pixel coordinates of the ones I pass over.
    I don't have mesh connected so hit.texturecoord is always zero.
    Any suggestions ?

    Thanks,
    Daniele