|
PR:WWII General Discussion General discussion of the Project Reality WWII modification. |
![]() |
|
Thread Tools | Display Modes |
![]() |
#11 |
|
![]() |
|
|
![]() |
![]() |
![]() |
#12 |
PR:BF2 Lead Developer
![]() ![]() |
![]()
To achieve that you will need to do basic trigonometry. All calculations are done using radians.
1. Calculate the correct ObjectTemplate.zoom.zoomFactor. This value is the vertical FOV and relates to the magnification like this: Code:
FOV=ATAN(TAN(1.1/2)/Magnification)*2 4x zoom would result in Code:
FOV = ATAN(TAN(1.1/2)/4)*2 FOV = 0.304 Code:
Angle=ATAN(Distance/Height) Code:
Pixels = TAN(Angle) / TAN(FOV/2) * VerticalPixels/2 For example: Angle=0.1, FOV=0.304, VerticalPixels=900 Code:
Pixels=TAN(0.1) / TAN(0.304/2) * 900/2 Pixels=29.377 ~ 29 5. Dont try to be too perfect ![]() Last a tip regarding the equipment of the imperialists: Even tho they used freedom units back then, use meters in game. It makes things easier to adjust as well as easier for player to use as everything else in game is using meters. |
![]() Mineral: TIL that Wire-guided missiles actually use wire
|
|
![]() |
![]() |
![]() |
Tags |
binoculars, german, reticle, usarmy, ww2 |
Thread Tools | |
Display Modes | |
|
|