This shows you the differences between two versions of the page.
Next revision | Previous revisionLast revisionBoth sides next revision | ||
tutorials:basic_physics_and_collisions [2016/12/27 07:48 (7 years ago)] – created sausage | en:tutorials:basic_physics_and_collisions [2020/08/19 06:38 (4 years ago)] – ↷ Links adapted because of a move operation sausage | ||
---|---|---|---|
Line 15: | Line 15: | ||
First, here is a ball you can use which will bounce around the screen: | First, here is a ball you can use which will bounce around the screen: | ||
- | {{ :tutorials: | + | {{ tutorials:physics:ball.png |}} |
Save the ball.png to your project' | Save the ball.png to your project' | ||
Line 38: | Line 38: | ||
Compile, and run. You will see a ball sitting in the middle of the screen. | Compile, and run. You will see a ball sitting in the middle of the screen. | ||
- | {{ :tutorials: | + | {{ tutorials:physics: |
The next step is to enable the gravity for our world. This can be done with: | The next step is to enable the gravity for our world. This can be done with: | ||
Line 127: | Line 127: | ||
Re-run. This is a very handy feature of Orx. You can see the debug borders on the bodies clearly marking where collisions can occur. | Re-run. This is a very handy feature of Orx. You can see the debug borders on the bodies clearly marking where collisions can occur. | ||
- | {{ :tutorials: | + | {{ tutorials:physics: |
And notice that the ball has a spherical body and the borders have box bodies. Yet the ball is still falling through. Clearly something isn't right. | And notice that the ball has a spherical body and the borders have box bodies. Yet the ball is still falling through. Clearly something isn't right. | ||
Line 273: | Line 273: | ||
Compile and run. | Compile and run. | ||
- | {{ :tutorials: | + | {{ tutorials:physics: |
Not exactly exciting, but we do get a successful message when the balls collide. | Not exactly exciting, but we do get a successful message when the balls collide. | ||
- | That takes care of demonstrating physics and gravity, and also collisions between object body parts. If you would like to experiment a little further with physics, collisions and resulting FX, feel free to move on to the [[tutorials: | + | That takes care of demonstrating physics and gravity, and also collisions between object body parts. If you would like to experiment a little further with physics, collisions and resulting FX, feel free to move on to the [[en:tutorials: |