Changeset 9846 for code/branches/wiimote/src
- Timestamp:
- Dec 2, 2013, 2:57:38 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/wiimote/src/libraries/core/input/WiiMote.cc
r9845 r9846 23 23 p->SetMotionSensingMode(CWiimote::ON); 24 24 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()); 27 27 IntVector2 abs(0, 0); 28 28 IntVector2 rel(x, y); … … 31 31 lastOrientation.yaw = o.yaw; 32 32 orxout()<<x<<std::endl<<y<<std::endl; 33 if(x!=0 &&y!=0)33 if(x!=0 || y!=0) 34 34 { 35 35 for (unsigned int i = 0; i < inputStates_.size(); ++i)
Note: See TracChangeset
for help on using the changeset viewer.