Dear vvvv gurus,
here is a small question on how to place a PNG image pixelprecise on a screen AND perform a HitTest on it afterwards.
Placing on a screen is easy: Billboard (Transform) with its _ObjectSpace _set to ‘Pixel’ and additional Scale (Transform) with the size from the FileTexture (EX9.Texture).
But now I’m stuck with how to perform a HitTest on it.
This will help a lot with all kind of GUIs.
Patch is below.
pixel-precise-images.v4p (10.8 kB)
When you change the Space by Billboard to Pixel everything is transformed Pixelbased and not like VVVVs standard (0,1) so you have to multiply the MouseXY Output by the size of the Renderer. Otherwise your Mouse outputs just (0,1) but your Object is at (400, 300) for example.
Ah yepp that was the old EX9 Stuff :).
Haven’t worked with Ex9 for a while now.
If you have the chance to work with DX11 its much more easy… See attached patch.
Dx11Hittest.v4p (8.6 kB)