Fix horizon offset
This commit is contained in:
parent
f24db847ce
commit
7f00b5aa5f
7 changed files with 34 additions and 40 deletions
14
racing.h
14
racing.h
|
@ -1245,8 +1245,6 @@ uint32_t LCR_racingStep(unsigned int input)
|
|||
LCR_racing.carBody.joints[LCR_CAR_JOINTS - 1].velocity[j];
|
||||
}
|
||||
|
||||
// TODO: magic constants
|
||||
|
||||
if (input & (LCR_RACING_INPUT_FORW | LCR_RACING_INPUT_BACK))
|
||||
{
|
||||
LCR_GameUnit rotateBy =
|
||||
|
@ -1336,7 +1334,7 @@ uint32_t LCR_racingStep(unsigned int input)
|
|||
LCR_racing.carBody.joints[i].velocity[2] = jv.z;
|
||||
}
|
||||
|
||||
driftFriction /= 4;
|
||||
driftFriction /= 4; // divide by 4 wheels
|
||||
|
||||
if ((!LCR_racing.carDrifting) &&
|
||||
driftFriction > LCR_CAR_DRIFT_THRESHOLD_1)
|
||||
|
@ -1411,7 +1409,7 @@ uint32_t LCR_racingStep(unsigned int input)
|
|||
LCR_racing.carBody.joints[4].position,
|
||||
LCR_racing.carBody.joints[0].position)));
|
||||
|
||||
if (angle < TPE_F / 64) // TODO: magic constant
|
||||
if (angle < TPE_F / 64) // TPE_F / 64 is a magic constant
|
||||
{
|
||||
LCR_LOG2("roof squeezed, applying anti force")
|
||||
|
||||
|
@ -1559,8 +1557,7 @@ uint32_t LCR_racingStep(unsigned int input)
|
|||
Draws a simple 3D debug overlap of the physics world.
|
||||
*/
|
||||
void LCR_physicsDebugDraw(LCR_GameUnit camPos[3], LCR_GameUnit camRot[2],
|
||||
LCR_GameUnit camFov,
|
||||
void (*drawPixel)(uint16_t, uint16_t, uint8_t))
|
||||
LCR_GameUnit camFov, void (*drawPixel)(uint16_t, uint16_t, uint8_t))
|
||||
{
|
||||
#if LCR_SETTING_DEBUG_PHYSICS_DRAW
|
||||
LCR_LOG2("drawing physics debug");
|
||||
|
@ -1581,11 +1578,6 @@ void LCR_physicsDebugDraw(LCR_GameUnit camPos[3], LCR_GameUnit camRot[2],
|
|||
|
||||
TPE_worldDebugDraw(&(LCR_racing.physicsWorld),drawPixel,
|
||||
cPos,cRot,cView,16,LCR_PHYSICS_UNIT / 4,LCR_racing.tick * 4);
|
||||
|
||||
/*
|
||||
TPE_worldDebugDraw(&(LCR_racing.physicsWorld),_LCR_drawPhysicsDebugPixel,
|
||||
cPos,cRot,cView,16,LCR_PHYSICS_UNIT / 4,LCR_racing.tick * 4);
|
||||
*/
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue