Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 2, 2013, 2:57:38 PM (11 years ago)
Author:
georgr
Message:

trying to get a reaction out of the wiiMote, 5th try

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/wiimote/src/libraries/core/input/WiiMote.cc

    r9845 r9846  
    2323                        p->SetMotionSensingMode(CWiimote::ON);
    2424                        p->Accelerometer.GetOrientation(o.pitch, o.roll, o.yaw);
    25                         int x = (int)(1000*(o.yaw-lastOrientation.yaw)/time.getDeltaTime());
    26                         int y = (int)(1000*(o.pitch-lastOrientation.pitch)/time.getDeltaTime());
     25                        int x = (int)((o.yaw-lastOrientation.yaw)/time.getDeltaTime());
     26                        int y = (int)((o.pitch-lastOrientation.pitch)/time.getDeltaTime());
    2727                        IntVector2 abs(0, 0);
    2828                        IntVector2 rel(x, y);
     
    3131                        lastOrientation.yaw = o.yaw;
    3232                        orxout()<<x<<std::endl<<y<<std::endl;
    33                         if(x!=0 && y!=0)
     33                        if(x!=0 || y!=0)
    3434                        {
    3535                                for (unsigned int i = 0; i < inputStates_.size(); ++i)
Note: See TracChangeset for help on using the changeset viewer.