User Tools

Site Tools


en:tutorials:physics:basic_physics_and_collisions

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Last revision Both sides next revision
en:tutorials:physics:basic_physics_and_collisions [2018/02/14 00:46 (5 years ago)]
127.0.0.1 external edit
en:tutorials:physics:basic_physics_and_collisions [2020/08/19 06:38 (2 years ago)]
sausage ↷ Links adapted because of a move operation
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:​ball.png |}}+{{ tutorials:physics:ball.png |}}
  
 Save the ball.png to your project'​s data folder. Save the ball.png to your project'​s data folder.
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:​ball-shot01.png |}}+{{ tutorials:physics:​ball-shot01.png |}}
  
 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:​ball-shot02.png |}}+{{ tutorials:physics:​ball-shot02.png |}}
  
 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:​ball-shot03.png |}}+{{ tutorials:physics:​ball-shot03.png |}}
  
 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 [[en:​tutorials:​physics|Physics Tutorial]]. 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|Physics Tutorial]].
en/tutorials/physics/basic_physics_and_collisions.txt · Last modified: 2020/08/21 00:13 (2 years ago) by 106.11.152.93