mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-04-16 08:48:56 +02:00
Increase HUD overlay radius
This commit is contained in:
parent
d2d10d2975
commit
436bed3a69
3 changed files with 6 additions and 4 deletions
|
@ -70,6 +70,8 @@ bool OverlayConductor::updateAvatarIsAtRest() {
|
|||
void OverlayConductor::centerUI() {
|
||||
// place the overlay at the current hmd position in sensor space
|
||||
auto camMat = cancelOutRollAndPitch(qApp->getHMDSensorPose());
|
||||
// Set its radius.
|
||||
camMat = glm::scale(camMat, glm::vec3(HUD_RADIUS));
|
||||
qApp->getApplicationCompositor().setModelTransform(Transform(camMat));
|
||||
}
|
||||
|
||||
|
|
|
@ -384,9 +384,9 @@ bool CompositorHelper::calculateRayUICollisionPoint(const glm::vec3& position, c
|
|||
glm::vec3 localPosition = transformPoint(worldToUi, position);
|
||||
glm::vec3 localDirection = glm::normalize(transformVectorFast(worldToUi, direction));
|
||||
|
||||
const float UI_RADIUS = 1.0f;
|
||||
const float UNIT_RADIUS = 1.0f;
|
||||
float intersectionDistance;
|
||||
if (raySphereIntersect(localDirection, localPosition, UI_RADIUS, &intersectionDistance)) {
|
||||
if (raySphereIntersect(localDirection, localPosition, UNIT_RADIUS, &intersectionDistance)) {
|
||||
result = transformPoint(uiToWorld, localPosition + localDirection * intersectionDistance);
|
||||
#ifdef WANT_DEBUG
|
||||
DebugDraw::getInstance().drawRay(position, result, glm::vec4(0.0f, 1.0f, 0.0f, 1.0f));
|
||||
|
@ -407,9 +407,8 @@ bool CompositorHelper::calculateParabolaUICollisionPoint(const glm::vec3& origin
|
|||
glm::vec3 localVelocity = glm::normalize(transformVectorFast(worldToUi, velocity));
|
||||
glm::vec3 localAcceleration = glm::normalize(transformVectorFast(worldToUi, acceleration));
|
||||
|
||||
const float UI_RADIUS = 1.0f;
|
||||
float intersectionDistance;
|
||||
if (findParabolaSphereIntersection(localOrigin, localVelocity, localAcceleration, glm::vec3(0.0f), UI_RADIUS, intersectionDistance)) {
|
||||
if (findParabolaSphereIntersection(localOrigin, localVelocity, localAcceleration, glm::vec3(0.0f), HUD_RADIUS, intersectionDistance)) {
|
||||
result = origin + velocity * intersectionDistance + 0.5f * acceleration * intersectionDistance * intersectionDistance;
|
||||
parabolicDistance = intersectionDistance;
|
||||
return true;
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
class ReticleInterface;
|
||||
|
||||
const float DEFAULT_RETICLE_DEPTH = 1.0f; // FIXME - probably should be based on UI radius
|
||||
const float HUD_RADIUS = 1.5f;
|
||||
|
||||
const float MAGNIFY_WIDTH = 220.0f;
|
||||
const float MAGNIFY_HEIGHT = 100.0f;
|
||||
|
|
Loading…
Reference in a new issue