mirror of
https://github.com/overte-org/overte.git
synced 2025-04-22 11:53:28 +02:00
Removed renderPitch(), and renderYaw() from code/classes - we will use bodyPitch(), headPitch() only.
This commit is contained in:
parent
73c793c0a1
commit
124f04820e
3 changed files with 4 additions and 9 deletions
|
@ -306,7 +306,7 @@ void Application::paintGL() {
|
|||
if (_myCamera.getMode() == CAMERA_MODE_FIRST_PERSON) {
|
||||
_myCamera.setTargetPosition(_myAvatar.getSpringyHeadPosition());
|
||||
_myCamera.setTargetRotation(_myAvatar.getAbsoluteHeadYaw(),
|
||||
_myAvatar.getRenderPitch(), 0.0f);
|
||||
_myAvatar.getAbsoluteHeadPitch(), 0.0f);
|
||||
|
||||
} else if (_myCamera.getMode() == CAMERA_MODE_THIRD_PERSON) {
|
||||
_myCamera.setTargetPosition(_myAvatar.getHeadPosition());
|
||||
|
@ -1225,6 +1225,7 @@ void Application::updateAvatar(float deltaTime) {
|
|||
// Update head and body pitch and yaw based on measured gyro rates
|
||||
if (_gyroLook->isChecked()) {
|
||||
// Render Yaw
|
||||
/* NOTE: PER - Leave here until I get back and can modify to couple gyros to head pitch, yaw
|
||||
float renderYawSpring = fabs(_headMouseX - _glWidget->width() / 2.f) / (_glWidget->width() / 2.f);
|
||||
const float RENDER_YAW_MULTIPLY = 4.f;
|
||||
_myAvatar.setRenderYaw((1.f - renderYawSpring * deltaTime) * _myAvatar.getRenderYaw() +
|
||||
|
@ -1234,6 +1235,7 @@ void Application::updateAvatar(float deltaTime) {
|
|||
const float RENDER_PITCH_MULTIPLY = 4.f;
|
||||
_myAvatar.setRenderPitch((1.f - renderPitchSpring * deltaTime) * _myAvatar.getRenderPitch() +
|
||||
renderPitchSpring * deltaTime * -_myAvatar.getHeadPitch() * RENDER_PITCH_MULTIPLY);
|
||||
*/
|
||||
}
|
||||
|
||||
if (OculusManager::isConnected()) {
|
||||
|
|
|
@ -96,8 +96,6 @@ Avatar::Avatar(bool isMine) {
|
|||
_head.initialize();
|
||||
|
||||
_movedHandOffset = glm::vec3(0.0f, 0.0f, 0.0f);
|
||||
_renderYaw = 0.0;
|
||||
_renderPitch = 0.0;
|
||||
_sphere = NULL;
|
||||
_handHoldingPosition = glm::vec3(0.0f, 0.0f, 0.0f);
|
||||
_distanceToNearestAvatar = std::numeric_limits<float>::max();
|
||||
|
@ -126,7 +124,6 @@ Avatar::Avatar(const Avatar &otherAvatar) {
|
|||
_mode = otherAvatar._mode;
|
||||
_isMine = otherAvatar._isMine;
|
||||
_renderYaw = otherAvatar._renderYaw;
|
||||
_renderPitch = otherAvatar._renderPitch;
|
||||
_maxArmLength = otherAvatar._maxArmLength;
|
||||
_transmitterTimer = otherAvatar._transmitterTimer;
|
||||
_transmitterIsFirstData = otherAvatar._transmitterIsFirstData;
|
||||
|
@ -303,7 +300,7 @@ void Avatar::updateFromMouse(int mouseX, int mouseY, int screenWidth, int scree
|
|||
((mouseLocationX > 0.f) ?
|
||||
mouseMag :
|
||||
-mouseMag) );
|
||||
printLog("yaw = %f\n", getBodyYaw());
|
||||
//printLog("yaw = %f\n", getBodyYaw());
|
||||
}
|
||||
|
||||
return;
|
||||
|
|
|
@ -84,10 +84,6 @@ public:
|
|||
void updateHeadFromGyros(float frametime, SerialInterface * serialInterface, glm::vec3 * gravity);
|
||||
void updateFromMouse(int mouseX, int mouseY, int screenWidth, int screenHeight);
|
||||
void setNoise (float mag) {_head.noise = mag;}
|
||||
void setRenderYaw(float y) {_renderYaw = y;}
|
||||
void setRenderPitch(float p) {_renderPitch = p;}
|
||||
float getRenderYaw() {return _renderYaw;}
|
||||
float getRenderPitch() {return _renderPitch;}
|
||||
float getLastMeasuredHeadYaw() const {return _head.yawRate;}
|
||||
float getBodyYaw() {return _bodyYaw;};
|
||||
void addBodyYaw(float y) {_bodyYaw += y;};
|
||||
|
|
Loading…
Reference in a new issue