This commit is contained in:
Jeffrey Ventrella 2013-05-09 11:22:24 -07:00
parent a75f655e40
commit e923f5446d
2 changed files with 21 additions and 18 deletions

View file

@ -403,7 +403,10 @@ void Avatar::simulate(float deltaTime) {
if (tiltDecay < 0.0f) {tiltDecay = 0.0f;}
_bodyPitch *= tiltDecay;
_bodyRoll *= tiltDecay;
//wtf? - why won't this compile?
//angleBetween(&_orientation.getUp(), &_gravity);
// update position by velocity
_position += _velocity * deltaTime;

View file

@ -13,22 +13,22 @@
Camera::Camera() {
_frustumNeedsReshape = false;
_mode = CAMERA_MODE_THIRD_PERSON;
_tightness = 10.0; // default
_fieldOfView = 60.0; // default
_nearClip = 0.08; // default
_farClip = 50.0 * TREE_SCALE; // default
_modeShift = 0.0;
_yaw = 0.0;
_pitch = 0.0;
_roll = 0.0;
_upShift = 0.0;
_rightShift = 0.0;
_distance = 0.0;
_idealYaw = 0.0;
_targetPosition = glm::vec3(0.0, 0.0, 0.0);
_position = glm::vec3(0.0, 0.0, 0.0);
_idealPosition = glm::vec3(0.0, 0.0, 0.0);
_mode = CAMERA_MODE_THIRD_PERSON;
_tightness = 10.0; // default
_fieldOfView = 60.0; // default
_nearClip = 0.08; // default
_farClip = 50.0 * TREE_SCALE; // default
_modeShift = 0.0;
_yaw = 0.0;
_pitch = 0.0;
_roll = 0.0;
_upShift = 0.0;
_rightShift = 0.0;
_distance = 0.0;
_idealYaw = 0.0;
_targetPosition = glm::vec3(0.0, 0.0, 0.0);
_position = glm::vec3(0.0, 0.0, 0.0);
_idealPosition = glm::vec3(0.0, 0.0, 0.0);
_orientation.setToIdentity();
}
@ -38,7 +38,7 @@ void Camera::update(float deltaTime) {
if (_mode == CAMERA_MODE_NULL) {
_modeShift = 0.0;
} else {
// use iterative forces to keep the camera at the desired position and angle
// use iterative forces to push the camera towards the desired position and angle
updateFollowMode(deltaTime);
if (_modeShift < 1.0f) {