User Tools

Site Tools


en:tutorials:physics

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
en:tutorials:physics [2009/08/15 09:12 (11 years ago)]
iarwain Links to en:orx:tutorials changed to en:orx:tutorials:main
en:tutorials:physics [2018/06/21 16:48 (24 months ago)] (current)
Line 3: Line 3:
 ===== Summary ===== ===== Summary =====
  
-See previous ​[[main#​Basic|basic tutorials]] for more info about basic [[object|object creation]], [[clock|clock handling]], [[frame|frames hierarchy]],​ [[anim|animations]],​ [[viewport|cameras & viewports]],​ [[sound|sounds & musics]] and [[FX|FXs]].+See previous basic tutorials for more info about basic [[object|object creation]], [[clock|clock handling]], [[frame|frames hierarchy]],​ [[anim|animations]],​ [[viewport|cameras & viewports]],​ [[sound|sounds & musics]] and [[FX|FXs]].
  
-This tutorial shows how to add physical properties to objects and handle collisions.+This tutorial shows how to add physical properties to objects. By adding a body (and body parts) you can  ​handle collisions ​between objects.
  
-As you can see, the physical properties are completely data-driven. Thus, creating an object with physical properties (ie. with a body) or without results in the exact same line of code.+As you can see, the physical properties are completely ​[[en:​orx:​config:​main|data-driven]]. Thus, creating an object with physical properties (ie. with a body) or without results in the exact same line of code, eg: 
 + 
 +<code c> 
 +orxObject_CreateFromConfig("​MyObject"​);​ 
 +</​code>​
  
 Objects can be linked to a body which can be static or dynamic.\\ Objects can be linked to a body which can be static or dynamic.\\
Line 40: Line 44:
 ===== Details ===== ===== Details =====
  
-As usual, we begin by loading our config file, creating a clock and registering our ''​Update''​ function to it.\\ +As usual, we begin by creating a viewport, getting the main clock and registering our ''​Update''​ function to it.\\ 
-Please refer to the [[main#​Basic|previous tutorials]] for more details.+Please refer to the previous tutorials for more details.
  
 We also creates our walls. Actually we won't create them one by one, we'll group them in a ''​ChildList''​ of a parent object. We also creates our walls. Actually we won't create them one by one, we'll group them in a ''​ChildList''​ of a parent object.
Line 113: Line 117:
 //NB: All rotations in orx's code are always expressed in radians!// //NB: All rotations in orx's code are always expressed in radians!//
  
-Let's now have a look at our config data.\\+Let's now have a look at our config data. You can find more info on the config parameters in the [[en:​orx:​config:​settings_structure:​orxBODY|body section of config settings]].  ​\\
 First, we created implicitely many walls using the ''​ChildList''​ property. See below how it is done. First, we created implicitely many walls using the ''​ChildList''​ property. See below how it is done.
  
Line 208: Line 212:
 ===== Resources ===== ===== Resources =====
  
-Source code: [[https://orx.svn.sourceforge.net/svnroot/orx/trunk/​tutorial/​src/08_Physics/​08_Physics.c|08_Physics.c]]+Source code: [[https://bitbucket.org/orx/orx/src/default/​tutorial/​src/​08_Physics.c|08_Physics.c]]
  
-Config file: [[https://orx.svn.sourceforge.net/svnroot/orx/trunk/​tutorial/​bin/​08_Physics.ini|08_Physics.ini]]+Config file: [[https://bitbucket.org/orx/orx/src/default/​tutorial/​bin/​08_Physics.ini|08_Physics.ini]]
  
 +Video: [[http://​www.youtube.com/​watch?​v=tNajMu6C38E|Video by acksys]]
en/tutorials/physics.1250327544.txt.gz · Last modified: 2017/05/30 07:50 (3 years ago) (external edit)