FitViewport
when using this viewport and get the touch point, as you can see in the below 1st GIF that the bullet is direction is not accurate to the touch point.
StretchViewport
but using this viewport, the touch point and bullet direction is entirely fixed and accurate.
If a Camera
has a Viewport
, use the viewport class method unproject()
instead of using the camera class.