How to display 2D image to 3D screen

Started by Hellfire, November 21, 2022, 12:13:39 PM

Previous topic - Next topic

Hellfire

Hello friends. How to display 2D Image to the camera?
I'am trying to make a Joystick


Hellfire

Quote from: AeroShark333 on November 21, 2022, 10:27:21 PM
Hello welcome!

Quote from: Hellfire on November 21, 2022, 12:13:39 PM
Hello friends. How to display 2D Image to the camera?
I'am trying to make a Joystick
I'd recommend the blitting functions of the FrameBuffer:
https://www.jpct.net/jpct-ae/doc/com/threed/jpct/FrameBuffer.html#blit-com.threed.jpct.Texture-float-float-float-float-float-float-float-float-int-boolean-

I hope this helps :)
Thank you, its working, i didn't have the perfect texture though  ::) ::)

AeroShark333

Quote from: Hellfire on November 22, 2022, 12:39:50 PM
Thank you, its working, i didn't have the perfect texture though  ::) ::)
Glad to hear!

For a joystick, I'd recommend a PNG file as texture (where the outside is transparent), otherwise a JPG texture (where the outside is black).
Make sure to use the constructors in Texture that have 'useAlpha' (which you should then set to true): https://www.jpct.net/jpct-ae/doc/com/threed/jpct/Texture.html#Texture-Bitmap-boolean-