You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wrote a similar project. This question has been bothering me for a long time.
I can get the location of the enemy projection on the screen. But how to get real mouse movement vectors? In the game, the angle at which the field of view moves is proportional to how many pixels the mouse moves. But there is a tangential relationship between the enemy's projection position and the angle of movement. How to get the distance between the camera and the screen?
I found a similar snippet in your code, so thought you must have found a workaround.
In this code, it seems that you are thinking that the distance between the camera and the screen is 640. I would like to know why this is possible and what the formula means. There is a mathematical principle behind this, or is it obtained by knowing the tangent relationship and adjusting the parameter coefficient?
I would be very grateful if you could answer my questions!
The text was updated successfully, but these errors were encountered:
In the FPS game, the position of the mouse is fixed in the center of the screen, and what you send is the relative movement of the center of the screen and the target in two-dimensional space each time.
The 640 is the window size in the yolo process.
I wrote a similar project. This question has been bothering me for a long time.
I can get the location of the enemy projection on the screen. But how to get real mouse movement vectors? In the game, the angle at which the field of view moves is proportional to how many pixels the mouse moves. But there is a tangential relationship between the enemy's projection position and the angle of movement. How to get the distance between the camera and the screen?
I found a similar snippet in your code, so thought you must have found a workaround.
In this code, it seems that you are thinking that the distance between the camera and the screen is 640. I would like to know why this is possible and what the formula means. There is a mathematical principle behind this, or is it obtained by knowing the tangent relationship and adjusting the parameter coefficient?
I would be very grateful if you could answer my questions!
The text was updated successfully, but these errors were encountered: