From 9e62728c3388ada26adaa7c740eb66999f653a74 Mon Sep 17 00:00:00 2001 From: Philip Rosedale Date: Thu, 25 Apr 2013 10:18:30 -0700 Subject: [PATCH] Changed velocity to be dvec3 --- interface/src/Avatar.cpp | 4 ++-- interface/src/Avatar.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/interface/src/Avatar.cpp b/interface/src/Avatar.cpp index 82d9f3334f..b19f1f3212 100644 --- a/interface/src/Avatar.cpp +++ b/interface/src/Avatar.cpp @@ -442,10 +442,10 @@ void Avatar::simulate(float deltaTime) { _bodyYawDelta *= (1.0 - TEST_YAW_DECAY * deltaTime); // add thrust to velocity - _velocity += glm::dvec3(_thrust * deltaTime); + _velocity += _thrust * deltaTime; // update position by velocity - _position += (glm::vec3)_velocity * deltaTime; + _position += _velocity * deltaTime; // decay velocity _velocity *= ( 1.0 - LIN_VEL_DECAY * deltaTime ); diff --git a/interface/src/Avatar.h b/interface/src/Avatar.h index e23821306b..52d5073932 100644 --- a/interface/src/Avatar.h +++ b/interface/src/Avatar.h @@ -236,7 +236,7 @@ class Avatar : public AvatarData { AvatarBone _bone[ NUM_AVATAR_BONES ]; AvatarMode _mode; AvatarHandHolding _handHolding; - glm::dvec3 _velocity; + glm::vec3 _velocity; glm::vec3 _thrust; float _maxArmLength; Orientation _orientation;