Camera smoothing.

This commit is contained in:
2021-09-26 19:09:47 -07:00
parent f3a16b9c8c
commit 27927a1820
4 changed files with 24 additions and 12 deletions

View File

@ -40,15 +40,16 @@ void pokerWorldInit(
void pokerWorldLookAtPlayer(
vnscene_t *scene, uint8_t playerIndex
) {
uint8_t seat = pokerGameSeatFromIndex(playerIndex);
vnSceneLookAt(scene,
scene->cameraLook.x,
scene->cameraLook.y,
scene->cameraLook.z,
POKER_WORLD_SEAT_POSITION_X(seat),
scene->cameraLook.lookY,
POKER_WORLD_SEAT_POSITION_Z(seat)
);
vnSceneLookAtCharacter(scene, playerIndex, -1);
// uint8_t seat = pokerGameSeatFromIndex(playerIndex);
// vnSceneLookAtCharacter(scene,
// scene->cameraLook.x,
// scene->cameraLook.y,
// scene->cameraLook.z,
// POKER_WORLD_SEAT_POSITION_X(seat),
// scene->cameraLook.lookY,
// POKER_WORLD_SEAT_POSITION_Z(seat)
// );
}
void pokerWorldRender(pokerworld_t *world, pokergameassets_t *assets) {

View File

@ -19,7 +19,7 @@
#include "pokergameassets.h"
#define POKER_WORLD_SEAT_DISTANCE -1
#define POKER_WORLD_SEAT_DISTANCE -0.75f
#define POKER_WORLD_SEAT_ROTATION(n) (n * mathDeg2Rad(45.0f))
#define POKER_WORLD_SEAT_POSITION_X(n) ( \