Fix physics bug
This commit is contained in:
parent
9dfbeae0d4
commit
5e73098460
4 changed files with 49 additions and 47 deletions
3
racing.h
3
racing.h
|
@ -81,6 +81,7 @@ typedef int32_t LCR_GameUnit; ///< abstract game unit
|
|||
#define LCR_CAR_STEER_FRICTION ((3 * TPE_F) / 4)
|
||||
#define LCR_CAR_ELASTICITY (TPE_F / 64)
|
||||
#define LCR_CAR_ACCELERATION (LCR_PHYSICS_UNIT / 9)
|
||||
|
||||
#define LCR_CAR_STEER_MAX (LCR_GAME_UNIT / 2)
|
||||
#define LCR_CAR_STEER_SPEED 50 ///< 0 to 64, lower is faster
|
||||
#define LCR_CAR_STEER_SLOWDOWN 64 ///< slows down steering at higher speeds
|
||||
|
@ -810,7 +811,7 @@ TPE_Vec3 _LCR_racingEnvironmentFunction(TPE_Vec3 point, TPE_Unit maxDist)
|
|||
|
||||
for (uint8_t i = 0; i < 8; ++i)
|
||||
{
|
||||
/* Black magic: here we make it so that we the lowest coord numbers
|
||||
/* Black magic: here we make it so that we check the lowest coord numbers
|
||||
(0,0,0), then the highest (1,1,1), then second lowest (1,0,0), then
|
||||
second highest (0,1,1) etc. This way we are narrowing the range (start,
|
||||
end) for the binary search. */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue