remove unused MoveTarget stuff from MyAvatar

This commit is contained in:
Andrew Meadows 2014-04-23 12:19:48 -07:00
parent 39c193a679
commit 203dac054a
2 changed files with 0 additions and 24 deletions

View file

@ -62,9 +62,7 @@ MyAvatar::MyAvatar() :
_thrust(0.0f),
_isThrustOn(false),
_thrustMultiplier(1.0f),
_moveTarget(0,0,0),
_lastBodyPenetration(0.0f),
_moveTargetStepCounter(0),
_lookAtTargetAvatar(),
_shouldRender(true),
_billboardValid(false),
@ -98,11 +96,6 @@ void MyAvatar::reset() {
setOrientation(glm::quat(glm::vec3(0.0f)));
}
void MyAvatar::setMoveTarget(const glm::vec3 moveTarget) {
_moveTarget = moveTarget;
_moveTargetStepCounter = 0;
}
void MyAvatar::update(float deltaTime) {
Head* head = getHead();
head->relaxLean(deltaTime);
@ -275,21 +268,6 @@ void MyAvatar::simulate(float deltaTime) {
float speed = glm::length(_velocity);
_moving = speed > MOVING_SPEED_THRESHOLD;
// If a move target is set, update position explicitly
const float MOVE_FINISHED_TOLERANCE = 0.1f;
const float MOVE_SPEED_FACTOR = 2.0f;
const int MOVE_TARGET_MAX_STEPS = 250;
if ((glm::length(_moveTarget) > EPSILON) && (_moveTargetStepCounter < MOVE_TARGET_MAX_STEPS)) {
if (glm::length(_position - _moveTarget) > MOVE_FINISHED_TOLERANCE) {
_position += (_moveTarget - _position) * (deltaTime * MOVE_SPEED_FACTOR);
_moveTargetStepCounter++;
} else {
// Move completed
_moveTarget = glm::vec3(0,0,0);
_moveTargetStepCounter = 0;
}
}
updateChatCircle(deltaTime);
_position += _velocity * deltaTime;

View file

@ -126,9 +126,7 @@ private:
bool _isThrustOn;
float _thrustMultiplier;
glm::vec3 _moveTarget;
glm::vec3 _lastBodyPenetration;
int _moveTargetStepCounter;
QWeakPointer<AvatarData> _lookAtTargetAvatar;
glm::vec3 _targetAvatarPosition;
bool _shouldRender;