Improved gravity in SDL Experiment 12
- Put a minimum speed of 0.01 on gravityAcceleration.y
This commit is contained in:
parent
37bf51e8a1
commit
3d45ee0558
|
@ -271,6 +271,11 @@ int main(int argc, char ** argv)
|
|||
gravityAcceleration = 1;
|
||||
}
|
||||
|
||||
if(gravityAcceleration < 0.01)
|
||||
{
|
||||
gravityAcceleration = 0.01;
|
||||
}
|
||||
|
||||
// Scale the vector:
|
||||
multiplyXYVector(&gravityVector, gravityAcceleration);
|
||||
|
||||
|
|
Loading…
Reference in New Issue