diff options
Diffstat (limited to 'src/gameScreen.c')
-rw-r--r-- | src/gameScreen.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/gameScreen.c b/src/gameScreen.c index a446f69..86b6a51 100644 --- a/src/gameScreen.c +++ b/src/gameScreen.c @@ -10,6 +10,7 @@ void initGameScreenGui(GameScreen * gameScreen) { // It is kind of terrible but works. gameScreen->infoText = (Vector2){0.0, height / 1.5}; + gameScreen->gyroscopePosition = (Vector2){ (width / 2.0) - (GYROSCOPE_TEXTURE_SIZE / 2.0), height / 1.8 @@ -35,7 +36,7 @@ void initGameScreen(GameScreen * gameScreen) { ); // Load model. - Mesh mesh = GenMeshSphere(1.0, 4, 4); + Mesh mesh = GenMeshSphere(1.0, 8, 8); gameScreen->gyroscopeModel = LoadModelFromMesh(mesh); } @@ -73,7 +74,11 @@ void drawGyroscope(Game * game) { ClearBackground(BLACK); BeginMode3D(gameScreen->gyroscopeCamaera); - DrawSphereWires(Vector3Zero(), 1.0, 8, 8, GREEN); + //DrawSphereWires(Vector3Zero(), 1.0, 8, 8, GREEN); + + gameScreen->gyroscopeModel.transform = QuaternionToMatrix(QuaternionInvert(player->rotation)); + + DrawModelWires(gameScreen->gyroscopeModel, Vector3Zero(), 1, GREEN); EndMode3D(); EndTextureMode(); |