Skip to content

Commit

Permalink
fixed camera not getting set up in time.
Browse files Browse the repository at this point in the history
  • Loading branch information
pokepetter committed Nov 4, 2023
1 parent 6ac96ab commit e8f122e
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions ursina/camera.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,12 @@ def __init__(self):
self._cam = None
self._render = None
self.ui_size = 40
self._ui_lens_node = None
self.ui = None

self._ui_lens_node = None
self.ui = Entity(eternal=True, name='ui', scale=(self.ui_size*.5, self.ui_size*.5), add_to_scene_entities=False)
self.overlay = Entity(parent=self.ui, model='quad', scale=99, color=color.clear, eternal=True, z=-99, add_to_scene_entities=False)
# self.fov = 40
# self.orthographic = False
self.orthographic = False
self.fov = 40 # horizontal fov


def set_up(self):
Expand All @@ -50,8 +49,6 @@ def set_up(self):
application.base.cam.node().set_lens(self.lens)

self.orthographic = False
self.fov = 40 # horizontal fov
# self.fov = 22.5
self.clip_plane_near = 0.1
self.clip_plane_far = 10000

Expand Down Expand Up @@ -190,7 +187,7 @@ def set_shader_input(self, name, value):
from ursina import *
from ursina import Ursina, camera, Entity, EditorCamera

window.borderless = False
# window.borderless = False
app = Ursina()

camera.orthographic = True
Expand Down

0 comments on commit e8f122e

Please sign in to comment.