History

LookatIndicator now scales with the avatar's scale.

Mark Peng committed 13 years ago

Commit 4e641ee1 parent 0f1ac2b2 files · +5 −2Browse files

Showing the changes to interface/src/Application.cpp (1 of 2 files). Show all

Unified · Split

interface/src/Application.cpp+4−2
@@ -200,6 +200,7 @@ Application::Application(int& argc, char** argv, timeval &startup_time) : · 199 unmodified lines
200200 _mouseVoxelScale(1.0f / 1024.0f),
201201 _justEditedVoxel(false),
202202 _isLookingAtOtherAvatar(false),
203+ _lookatIndicatorScale(1.0f),
203204 _paintOn(false),
204205 _dominantColor(0),
205206 _perfStatsOn(false),
@@ -1942,6 +1943,7 @@ bool Application::isLookingAtOtherAvatar(glm::vec3& mouseRayOrigin, glm::vec3& m · 1736 unmodified lines
19421943 glm::vec3 headPosition = avatar->getHead().getPosition();
19431944 if (rayIntersectsSphere(mouseRayOrigin, mouseRayDirection, headPosition, HEAD_SPHERE_RADIUS)) {
19441945 eyePosition = avatar->getHead().getEyeLevelPosition();
1946+ _lookatIndicatorScale = avatar->getScale();
19451947 _lookatOtherPosition = headPosition;
19461948 return true;
19471949 }
@@ -1952,8 +1954,8 @@ bool Application::isLookingAtOtherAvatar(glm::vec3& mouseRayOrigin, glm::vec3& m · 4 unmodified lines
19521954
19531955 void Application::renderLookatIndicator(glm::vec3 pointOfInterest, Camera& whichCamera) {
19541956
1955− const float DISTANCE_FROM_HEAD_SPHERE = 0.1f;
1956− const float INDICATOR_RADIUS = 0.1f;
1957+ const float DISTANCE_FROM_HEAD_SPHERE = 0.1f * _lookatIndicatorScale;
1958+ const float INDICATOR_RADIUS = 0.1f * _lookatIndicatorScale;
19571959 const float YELLOW[] = { 1.0f, 1.0f, 0.0f };
19581960 const int NUM_SEGMENTS = 30;
19591961 glm::vec3 haloOrigin(pointOfInterest.x, pointOfInterest.y + DISTANCE_FROM_HEAD_SPHERE, pointOfInterest.z);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t