git.ucc.asn.au
/
atyndall
/
cits2231.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
(no commit message)
[atyndall/cits2231.git]
/
scene.c
diff --git
a/scene.c
b/scene.c
index
0834fa2
..
ee4f614
100644
(file)
--- a/
scene.c
+++ b/
scene.c
@@
-307,10
+307,11
@@
void motion(int x, int y) {
// w: left/right, h: near/far
\r
\r
// **NOTE: Currently a work in progress, does not work correctly
\r
// w: left/right, h: near/far
\r
\r
// **NOTE: Currently a work in progress, does not work correctly
\r
+ float angler = 2 * M_PI * ( (90 - rotate*camRotateFactor)/360.0 );
\r
printf("cam angle: %f\n", rotate*camRotateFactor);
\r
// float arc = arctan()
\r
printf("cam angle: %f\n", rotate*camRotateFactor);
\r
// float arc = arctan()
\r
- sceneObjs[curObject].x += diffx *
sin(rotate*camRotateFacto
r) * 0.3;
\r
- sceneObjs[curObject].z += diffx *
cos(rotate*camRotateFacto
r) * 0.3;
\r
+ sceneObjs[curObject].x += diffx *
cos(angle
r) * 0.3;
\r
+ sceneObjs[curObject].z += diffx *
sin(angle
r) * 0.3;
\r
\r
} else if ( buttonSelected == GLUT_MIDDLE_BUTTON ) {
\r
// w: big/small
\r
\r
} else if ( buttonSelected == GLUT_MIDDLE_BUTTON ) {
\r
// w: big/small
\r
UCC
git Repository :: git.ucc.asn.au