This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
en:tutorials:basic_physics_and_collisions [2018/02/13 20:46 (6 years ago)] – ↷ Page moved from tutorials:basic_physics_and_collisions to en:tutorials:basic_physics_and_collisions iarwain | en:tutorials:physics:basic_physics_and_collisions [2020/08/21 00:13 (4 years ago)] (current) – ↷ Links adapted because of a move operation 106.11.152.93 | ||
---|---|---|---|
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:physics: |