mirror of
https://github.com/overte-org/overte.git
synced 2025-04-21 06:44:06 +02:00
Missed a magic number
This commit is contained in:
parent
256b7efdd2
commit
c71dca5b4b
1 changed files with 2 additions and 1 deletions
|
@ -53,6 +53,7 @@ ContextOverlayInterface::ContextOverlayInterface() {
|
|||
static const xColor BB_OVERLAY_COLOR = {255, 255, 0};
|
||||
static const uint32_t LEFT_HAND_HW_ID = 1;
|
||||
static const xColor CONTEXT_OVERLAY_COLOR = { 255, 255, 255 };
|
||||
static const float CONTEXT_OVERLAY_INSIDE_DISTANCE = 1.0f; // in meters
|
||||
static const float CONTEXT_OVERLAY_CLOSE_DISTANCE = 1.5f; // in meters
|
||||
static const float CONTEXT_OVERLAY_CLOSE_SIZE = 0.12f; // in meters, same x and y dims
|
||||
static const float CONTEXT_OVERLAY_FAR_SIZE = 0.08f; // in meters, same x and y dims
|
||||
|
@ -111,7 +112,7 @@ bool ContextOverlayInterface::createOrDestroyContextOverlay(const EntityItemID&
|
|||
glm::vec2 contextOverlayDimensions;
|
||||
if (AABox(bbPosition - (dimensions / 2.0f), dimensions * 2.0f).contains(cameraPosition)) {
|
||||
// If the camera is inside the box, position the context overlay 1 meter in front of the camera.
|
||||
contextOverlayPosition = cameraPosition + 1.0f * (qApp->getCamera().getOrientation() * Vectors::FRONT);
|
||||
contextOverlayPosition = cameraPosition + CONTEXT_OVERLAY_INSIDE_DISTANCE * (qApp->getCamera().getOrientation() * Vectors::FRONT);
|
||||
contextOverlayDimensions = glm::vec2(CONTEXT_OVERLAY_CLOSE_SIZE, CONTEXT_OVERLAY_CLOSE_SIZE) * glm::distance(contextOverlayPosition, cameraPosition);
|
||||
} else if (distanceToEntity < CONTEXT_OVERLAY_CLOSE_DISTANCE) {
|
||||
// If the entity is too close to the camera, rotate the context overlay to the right of the entity.
|
||||
|
|
Loading…
Reference in a new issue