Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Feb 12, 2011, 11:34:40 AM (13 years ago)
Author:
landauf
Message:

implemented feature to reset the mouse cursor to the center
used in NewHumanController to set cursor to the center of the screen every time the ControllableEntity is changed
avoids turning of the spaceship right after spawn, if the player looked around in spectator mode

needs testing with derived mouse input (joysticks should be unchanged).
input system experts may have a look at this. ;)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/libraries/core/input/HalfAxis.h

    r5781 r7859  
    5858        bool addParamCommand(ParamCommand* command);
    5959        void clear();
     60        void reset();
    6061
    6162        // axis related
     
    7778        return success;
    7879    }
     80
     81    inline void HalfAxis::reset()
     82    {
     83        this->relVal_ = 0.0f;
     84        this->absVal_ = 0.0f;
     85        this->hasChanged_ = true;
     86    }
    7987}
    8088
Note: See TracChangeset for help on using the changeset viewer.