Expand test map
This commit is contained in:
parent
bac61bf05a
commit
beee13d2b3
2 changed files with 18 additions and 5 deletions
10
racing.h
10
racing.h
|
@ -872,22 +872,22 @@ if (TPE_vec3Dot(carVel,carForw) < 0)
|
|||
LCR_racing.carBody.joints[4].position,
|
||||
LCR_racing.carBody.joints[0].position)));
|
||||
|
||||
if (angle < TPE_F / 4) // TODO: magic constant
|
||||
if (angle < TPE_F / 64) // TODO: magic constant
|
||||
{
|
||||
LCR_LOG2("roof squeezed, applying anti force")
|
||||
|
||||
tmpVec = TPE_vec3Times(carUp,LCR_PHYSICS_UNIT / 16); // TODO: 16 magic con.
|
||||
|
||||
angle = TPE_F - 4 * angle; // 4 comes from above TPE_F / 4
|
||||
|
||||
tmpVec = TPE_vec3Times(tmpVec,angle);
|
||||
|
||||
if (angle <= 0)
|
||||
{
|
||||
LCR_LOG1("roof flipped over, fixing")
|
||||
LCR_racing.carBody.joints[4].position = wheelAverage;
|
||||
angle = 0;
|
||||
}
|
||||
|
||||
angle = TPE_F - 4 * angle; // 4 comes from above TPE_F / 4
|
||||
|
||||
tmpVec = TPE_vec3Times(tmpVec,angle);
|
||||
|
||||
// accelerate roof and wheels away from each other
|
||||
for (int i = 0; i < LCR_CAR_JOINTS; ++i)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue