mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 19:59:28 +02:00
Cleanup; no magic numbers for default cam params
This commit is contained in:
parent
34d0363ae5
commit
bd4fe416b4
2 changed files with 4 additions and 14 deletions
|
@ -40,9 +40,9 @@ public:
|
||||||
QUuid attachedEntityId{};
|
QUuid attachedEntityId{};
|
||||||
glm::vec3 position{};
|
glm::vec3 position{};
|
||||||
glm::quat orientation{};
|
glm::quat orientation{};
|
||||||
float vFoV{ 45.0f };
|
float vFoV{ DEFAULT_FIELD_OF_VIEW_DEGREES };
|
||||||
float nearClipPlaneDistance{ 0.1f };
|
float nearClipPlaneDistance{ DEFAULT_NEAR_CLIP };
|
||||||
float farClipPlaneDistance{ 16384.0f };
|
float farClipPlaneDistance{ DEFAULT_FAR_CLIP };
|
||||||
SecondaryCameraJobConfig() : render::Task::Config(false) {}
|
SecondaryCameraJobConfig() : render::Task::Config(false) {}
|
||||||
signals:
|
signals:
|
||||||
void dirty();
|
void dirty();
|
||||||
|
|
|
@ -46,11 +46,7 @@
|
||||||
// -Far clip plane distance
|
// -Far clip plane distance
|
||||||
// -viewFinderOverlay: The in-world overlay that displays the spectator camera's view.
|
// -viewFinderOverlay: The in-world overlay that displays the spectator camera's view.
|
||||||
// -camera: The in-world entity that corresponds to the spectator camera.
|
// -camera: The in-world entity that corresponds to the spectator camera.
|
||||||
// -cameraIsDynamic: "false" for now while we figure out why dynamic, parented overlays
|
// -cameraIsDynamic: "false" for now - maybe it shouldn't be? False means that the camera won't drift when you let go...
|
||||||
// drift with respect to their parent.
|
|
||||||
// -vFoV: The vertical field of view of the spectator camera.
|
|
||||||
// -nearClipPlaneDistance: The near clip plane distance of the spectator camera (aka "camera").
|
|
||||||
// -farClipPlaneDistance: The far clip plane distance of the spectator camera.
|
|
||||||
// -cameraRotation: The rotation of the spectator camera.
|
// -cameraRotation: The rotation of the spectator camera.
|
||||||
// -cameraPosition: The position of the spectator camera.
|
// -cameraPosition: The position of the spectator camera.
|
||||||
// -glassPaneWidth: The width of the glass pane above the spectator camera that holds the viewFinderOverlay.
|
// -glassPaneWidth: The width of the glass pane above the spectator camera that holds the viewFinderOverlay.
|
||||||
|
@ -61,9 +57,6 @@
|
||||||
var viewFinderOverlay = false;
|
var viewFinderOverlay = false;
|
||||||
var camera = false;
|
var camera = false;
|
||||||
var cameraIsDynamic = false;
|
var cameraIsDynamic = false;
|
||||||
var vFoV = 45.0;
|
|
||||||
var nearClipPlaneDistance = 0.1;
|
|
||||||
var farClipPlaneDistance = 16384.0;
|
|
||||||
var cameraRotation;
|
var cameraRotation;
|
||||||
var cameraPosition;
|
var cameraPosition;
|
||||||
var glassPaneWidth = 0.16;
|
var glassPaneWidth = 0.16;
|
||||||
|
@ -75,9 +68,6 @@
|
||||||
// Sets the special texture size based on the window it is displayed in, which doesn't include the menu bar
|
// Sets the special texture size based on the window it is displayed in, which doesn't include the menu bar
|
||||||
spectatorCameraConfig.enableSecondaryCameraRenderConfigs(true);
|
spectatorCameraConfig.enableSecondaryCameraRenderConfigs(true);
|
||||||
spectatorCameraConfig.resetSizeSpectatorCamera(Window.innerWidth, Window.innerHeight);
|
spectatorCameraConfig.resetSizeSpectatorCamera(Window.innerWidth, Window.innerHeight);
|
||||||
spectatorCameraConfig.vFoV = vFoV;
|
|
||||||
spectatorCameraConfig.nearClipPlaneDistance = nearClipPlaneDistance;
|
|
||||||
spectatorCameraConfig.farClipPlaneDistance = farClipPlaneDistance;
|
|
||||||
cameraRotation = MyAvatar.orientation, cameraPosition = inFrontOf(1, Vec3.sum(MyAvatar.position, { x: 0, y: 0.3, z: 0 }));
|
cameraRotation = MyAvatar.orientation, cameraPosition = inFrontOf(1, Vec3.sum(MyAvatar.position, { x: 0, y: 0.3, z: 0 }));
|
||||||
camera = Entities.addEntity({
|
camera = Entities.addEntity({
|
||||||
"angularDamping": 1,
|
"angularDamping": 1,
|
||||||
|
|
Loading…
Reference in a new issue