mirror of
https://github.com/overte-org/overte.git
synced 2025-04-21 08:04:01 +02:00
Merge branch 'master' of https://github.com/worklist/hifi
This commit is contained in:
commit
f6efccea06
2 changed files with 11 additions and 12 deletions
|
@ -1127,8 +1127,8 @@ void MyAvatar::updateChatCircle(float deltaTime) {
|
|||
}
|
||||
|
||||
// remove members whose accumulated circles are too far away to influence us
|
||||
const float CIRCUMFERENCE_PER_MEMBER = 2.0f;
|
||||
const float CIRCLE_INFLUENCE_SCALE = 1.1f;
|
||||
const float CIRCUMFERENCE_PER_MEMBER = 0.5f;
|
||||
const float CIRCLE_INFLUENCE_SCALE = 2.0f;
|
||||
for (int i = sortedAvatars.size() - 1; i >= 0; i--) {
|
||||
float radius = (CIRCUMFERENCE_PER_MEMBER * (i + 2)) / PI_TIMES_TWO;
|
||||
if (glm::distance(_position, sortedAvatars[i].accumulatedCenter) > radius * CIRCLE_INFLUENCE_SCALE) {
|
||||
|
@ -1178,19 +1178,18 @@ void MyAvatar::updateChatCircle(float deltaTime) {
|
|||
}
|
||||
}
|
||||
|
||||
// if we're on top of a neighbor, we need to randomize so that they don't both go in the same direction
|
||||
if (rightDistance == 0.0f && randomBoolean()) {
|
||||
swap(leftDistance, rightDistance);
|
||||
}
|
||||
|
||||
// split the difference between our neighbors
|
||||
float targetAngle = myAngle + (rightDistance - leftDistance) / 2.0f;
|
||||
float targetAngle = myAngle + (rightDistance - leftDistance) / 4.0f;
|
||||
glm::vec3 targetPosition = center + (front * sinf(targetAngle) + right * cosf(targetAngle)) * radius;
|
||||
|
||||
// face the center of the circle
|
||||
glm::quat orientation = getOrientation();
|
||||
glm::quat targetOrientation = rotationBetween(orientation * IDENTITY_FRONT, center - targetPosition) * orientation;
|
||||
targetOrientation = rotationBetween(targetOrientation * IDENTITY_UP, up) * targetOrientation;
|
||||
|
||||
// approach the target position/orientation
|
||||
const float APPROACH_RATE = 0.025f;
|
||||
// approach the target position
|
||||
const float APPROACH_RATE = 0.05f;
|
||||
_position = glm::mix(_position, targetPosition, APPROACH_RATE);
|
||||
setOrientation(safeMix(orientation, targetOrientation, APPROACH_RATE));
|
||||
}
|
||||
|
||||
void MyAvatar::setGravity(glm::vec3 gravity) {
|
||||
|
|
|
@ -133,7 +133,7 @@ QOpenGLFramebufferObject* GlowEffect::render(bool toTexture) {
|
|||
|
||||
QOpenGLFramebufferObject* destFBO = toTexture ?
|
||||
Application::getInstance()->getTextureCache()->getSecondaryFramebufferObject() : NULL;
|
||||
if (_isEmpty) {
|
||||
if (_isEmpty && _renderMode != DIFFUSE_ADD_MODE) {
|
||||
// copy the primary to the screen
|
||||
if (QOpenGLFramebufferObject::hasOpenGLFramebufferBlit()) {
|
||||
QOpenGLFramebufferObject::blitFramebuffer(destFBO, primaryFBO);
|
||||
|
|
Loading…
Reference in a new issue