Revision: 2638
          http://rigsofrods.svn.sourceforge.net/rigsofrods/?rev=2638&view=rev
Author:   ulteq
Date:     2012-05-23 19:01:32 +0000 (Wed, 23 May 2012)
Log Message:
-----------
-Codechange: reduced travel and rotation speed in camera behavior free
+fixed the travel speed of diagonal translations

Modified Paths:
--------------
    trunk/source/main/gfx/camera/CameraBehaviorFree.cpp

Modified: trunk/source/main/gfx/camera/CameraBehaviorFree.cpp
===================================================================
--- trunk/source/main/gfx/camera/CameraBehaviorFree.cpp 2012-05-23 18:11:07 UTC 
(rev 2637)
+++ trunk/source/main/gfx/camera/CameraBehaviorFree.cpp 2012-05-23 19:01:32 UTC 
(rev 2638)
@@ -33,9 +33,9 @@
 {
        Degree mRotX(0.0f);
        Degree mRotY(0.0f);
-       Degree mRotScale(ctx.mRotScale * 0.5f);
+       Degree mRotScale(ctx.mRotScale * 0.25f);
        Vector3 mTrans(Vector3::ZERO);
-       Real mTransScale(ctx.mTransScale * 0.5f);
+       Real mTransScale(ctx.mTransScale * 0.25f);
 
        if(INPUTENGINE.isKeyDown(OIS::KC_LSHIFT) || 
INPUTENGINE.isKeyDown(OIS::KC_RSHIFT))
        {
@@ -44,13 +44,13 @@
        }
        if(INPUTENGINE.isKeyDown(OIS::KC_LCONTROL))
        {
-               mRotScale   *= 30.0f;
-               mTransScale *= 30.0f;
+               mRotScale   *= 20.0f;
+               mTransScale *= 20.0f;
        }
        if(INPUTENGINE.isKeyDown(OIS::KC_LMENU))
        {
-               mRotScale   *= 0.05f;
-               mTransScale *= 0.05f;
+               mRotScale   *= 0.1f;
+               mTransScale *= 0.1f;
        }
 
        if ( INPUTENGINE.getEventBoolValue(EV_CHARACTER_SIDESTEP_LEFT) )
@@ -98,7 +98,7 @@
        ctx.mCamera->yaw(mRotX);
        ctx.mCamera->pitch(mRotY);
 
-       Vector3 camPosition = ctx.mCamera->getPosition() + 
ctx.mCamera->getOrientation() * mTrans;
+       Vector3 camPosition = ctx.mCamera->getPosition() + 
ctx.mCamera->getOrientation() * mTrans.normalisedCopy() * mTransScale;
 
        if ( ctx.mHfinder )
        {

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Rigsofrods-devel mailing list
Rigsofrods-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rigsofrods-devel

Reply via email to