This commit is contained in:
PhilipRosedale 2013-10-17 11:07:45 -07:00
commit f6efccea06
2 changed files with 11 additions and 12 deletions

View file

@ -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) {

View file

@ -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);