mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 02:03:57 +02:00
Bug fix on lookatVectors (fixed scale in head.cpp). Added bool
isLookingAtOtherAvatar. Basic halo indicator in Application.cpp.
This commit is contained in:
parent
cfcb31172c
commit
927aea8bb4
2 changed files with 5 additions and 14 deletions
|
@ -1894,20 +1894,11 @@ bool Application::isLookingAtOtherAvatar(glm::vec3& mouseRayOrigin, glm::vec3& m
|
|||
|
||||
void Application::renderLookatIndicator(glm::vec3 pointOfInterest, Camera& whichCamera) {
|
||||
|
||||
glm::vec3 direction = glm::normalize(pointOfInterest - whichCamera.getPosition());
|
||||
const float DISTANCE_FROM_HEAD_SPHERE = 0.1f;
|
||||
glm::vec3 indicatorOrigin = pointOfInterest - DISTANCE_FROM_HEAD_SPHERE * direction;
|
||||
|
||||
// glm::vec3 haloOrigin(pointOfInterest.x, pointOfInterest.y + DISTANCE_FROM_HEAD_SPHERE, pointOfInterest.z);
|
||||
|
||||
glColor3f(1.0f, 0.0f, 0.0f);
|
||||
// renderCircle(haloOrigin, 0.1f, glm::vec3(0.0f, 1.0f, 0.0f), 30);
|
||||
loadViewFrustum(_myCamera, _viewFrustum);
|
||||
glm::vec3 normal;
|
||||
_viewFrustum.computeNormalToOffset(normal);
|
||||
|
||||
// Plane::Plane p(_viewFrustum.getOffsetPosition(), _viewFrustum.getOffsetUp(), _viewFrustum.getOffsetRight());
|
||||
renderCircle(indicatorOrigin, 0.1f, normal, 30);
|
||||
const float YELLOW[] = { 1.0f, 1.0f, 0.0f };
|
||||
glm::vec3 haloOrigin(pointOfInterest.x, pointOfInterest.y + DISTANCE_FROM_HEAD_SPHERE, pointOfInterest.z);
|
||||
glColor3f(YELLOW[0], YELLOW[1], YELLOW[2]);
|
||||
renderCircle(haloOrigin, 0.1f, glm::vec3(0.0f, 1.0f, 0.0f), 30);
|
||||
}
|
||||
|
||||
void Application::update(float deltaTime) {
|
||||
|
|
|
@ -271,7 +271,7 @@ void Head::calculateGeometry() {
|
|||
+ up * _scale * BODY_BALL_RADIUS_HEAD_BASE * EYE_UP_OFFSET
|
||||
+ front * _scale * BODY_BALL_RADIUS_HEAD_BASE * EYE_FRONT_OFFSET;
|
||||
|
||||
_eyeLevelPosition = _position + up * _scale * EYE_UP_OFFSET;
|
||||
_eyeLevelPosition = _position + up * _scale * BODY_BALL_RADIUS_HEAD_BASE * EYE_UP_OFFSET;
|
||||
|
||||
//calculate the eyebrow positions
|
||||
_leftEyeBrowPosition = _leftEyePosition;
|
||||
|
|
Loading…
Reference in a new issue