Change camera angle to birds eye view #608
-
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
What the EditorCamera does, is to make an Entity as a pivot point, parent the camera to it, and move the camera local z position back. You can then rotate the pivot point and the camera will rotate around that point. To get the current rotation of the editor camera, just do print(editor_camera.rotation) from ursina import *
app = Ursina()
Entity(model='plane', scale=8)
EditorCamera(rotation=(45,0,0))
app.run() |
Beta Was this translation helpful? Give feedback.
-
Here's how you'd do the same with just an Entity: from ursina import *
app = Ursina()
Entity(model='plane', scale=8)
pivot = Entity(rotation=(45,0,0))
camera.parent = pivot
app.run() |
Beta Was this translation helpful? Give feedback.
What the EditorCamera does, is to make an Entity as a pivot point, parent the camera to it, and move the camera local z position back. You can then rotate the pivot point and the camera will rotate around that point.
To get the current rotation of the editor camera, just do print(editor_camera.rotation)
You could set the editor camera's rotation to the on creation to avoid adjusting it manually each time.
Example: