Skip to content

Commit fa33cb9

Browse files
committed
fix: fixed FOV and added .FieldOfViewRadians
1 parent fa5cf53 commit fa33cb9

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

‎example.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,6 @@
3939
print("Player Count:", len(game.Players.GetPlayers()))
4040
print("==============================")
4141
print("CurrentCamera CFrame:", game.Workspace.CurrentCamera.CFrame)
42-
# print("CurrentCamera FOV:", game.Workspace.CurrentCamera.FieldOfView)
42+
print("CurrentCamera FOV:", game.Workspace.CurrentCamera.FieldOfView)
4343
print("CurrentCamera ViewportSize:", game.Workspace.CurrentCamera.ViewportSize)
4444

‎utils/rbx/instance.py‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from ..offsets import *
2-
import time
2+
import time, math
33
from utils.rbx.datastructures import *
44

55
# Normal Classes #
@@ -300,6 +300,10 @@ def __init__(self, memory_module, camera: RBXInstance):
300300
# props #
301301
@property
302302
def FieldOfView(self):
303+
return self.FieldOfViewRadians * (180/math.pi)
304+
305+
@property
306+
def FieldOfViewRadians(self):
303307
return self.memory_module.read_float(self.raw_address + Offsets["FOV"])
304308

305309
@property

0 commit comments

Comments
 (0)