Revision e6995f3b
Added by Leszek Koltunski almost 9 years ago
| src/main/java/org/distorted/examples/aroundtheworld/AroundTheWorldSurfaceViewPicker.java | ||
|---|---|---|
| 100 | 100 |
} |
| 101 | 101 |
|
| 102 | 102 |
mRenderer.move(xf,yf); |
| 103 |
mManager.setRace( 1.0f - (yf+1.5f)/3.0f, (xf+0.865f)/(3*0.865f) ); |
|
| 103 |
|
|
| 104 |
float distance_from_left =(xf+0.865f)/(3*0.865f); |
|
| 105 |
float distance_from_top =0.333f*(1-yf)-0.192f*xf; |
|
| 106 |
|
|
| 107 |
mManager.setRace( distance_from_top, distance_from_left ); |
|
| 104 | 108 |
} |
| 105 | 109 |
|
| 106 | 110 |
return true; |
Also available in: Unified diff
Compute Race correctly