Fix some more stuff

This commit is contained in:
Miloslav Ciz 2024-09-11 02:12:04 +02:00
parent ffbe827f22
commit 4b9b6ad8ae
3 changed files with 33 additions and 66 deletions

View file

@ -27,7 +27,7 @@ typedef int32_t LCR_GameUnit; ///< abstract game unit
#define LCR_CAR_TURN_FRICTION (4 * TPE_F / 4)
#define LCR_CAR_ELASTICITY (TPE_F / 100)
#define LCR_CAR_ACCELERATION (LCR_PHYSICS_UNIT / 15)
#define LCR_CAR_TURN_SPEED (LCR_GAME_UNIT / 16)
#define LCR_CAR_TURN_SPEED (LCR_GAME_UNIT / 20)
#define LCR_CAR_TURN_MAX (LCR_GAME_UNIT / 4)
/*
@ -149,7 +149,6 @@ void LCR_racingInit(void)
void LCR_racingGetCarTransform(LCR_GameUnit position[3],
LCR_GameUnit rotation[3], LCR_GameUnit interpolationParam)
{
#if LCR_SETTING_SMOOTH_ANIMATIONS
TPE_Vec3 v = TPE_vec3Plus(
LCR_racing.carPositions[1],
@ -175,7 +174,6 @@ void LCR_racingGetCarTransform(LCR_GameUnit position[3],
rotation[0] = (v.x * LCR_GAME_UNIT) / TPE_F;
rotation[1] = (v.y * LCR_GAME_UNIT) / TPE_F;
rotation[2] = (v.z * LCR_GAME_UNIT) / TPE_F;
// TODO: also smooth out rotation?
}
void _LCR_drawPhysicsDebugPixel(uint16_t x, uint16_t y, uint8_t color)
@ -360,9 +358,9 @@ LCR_racing.carPositions[0] =
LCR_racing.carPositions[1],
LCR_racing.carPositions[0],
TPE_vec3(
LCR_PHYSICS_UNIT / 64, // TODO: 64
LCR_PHYSICS_UNIT / 64,
LCR_PHYSICS_UNIT / 64
LCR_PHYSICS_UNIT / 50, // TODO: constant
LCR_PHYSICS_UNIT / 50,
LCR_PHYSICS_UNIT / 50
)
);