Changeset 9841 for code/branches/wiimote/src
- Timestamp:
- Dec 2, 2013, 2:46:02 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/wiimote/src/libraries/core/input/WiiMote.cc
r9838 r9841 21 21 orxout()<<"ZOMG!!1!"<<endl; 22 22 Orientation o; 23 p->Accelerometer. 23 24 p->Accelerometer.GetOrientation(o.pitch, o.roll, o.yaw); 24 int x = (int)( (o.yaw-lastOrientation.yaw)*time.getDeltaTime());25 int y = (int)( (o.pitch-lastOrientation.pitch)*time.getDeltaTime());25 int x = (int)(1000*(o.yaw-lastOrientation.yaw)/time.getDeltaTime()); 26 int y = (int)(1000*(o.pitch-lastOrientation.pitch)/time.getDeltaTime()); 26 27 IntVector2 abs(0, 0); 27 28 IntVector2 rel(x, y); 28 29 IntVector2 clippingSize(1920, 1080); 29 if(x!=0&&y!=0) 30 lastOrientation.pitch = o.pitch; 31 lastOrientation.yaw = o.yaw; 32 if(x!=0 && y!=0) 30 33 { 31 34 for (unsigned int i = 0; i < inputStates_.size(); ++i)
Note: See TracChangeset
for help on using the changeset viewer.