User Tools

Site Tools


en:tutorials:objects:creating_an_object_with_many_parts

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
en:tutorials:creating_an_object_with_many_parts [2018/02/13 20:46 (6 years ago)] – ↷ Page moved from tutorials:creating_an_object_with_many_parts to en:tutorials:creating_an_object_with_many_parts iarwainen:tutorials:objects:creating_an_object_with_many_parts [2020/08/21 06:05 (4 years ago)] (current) – ↷ Page moved from en:tutorials:creating_an_object_with_many_parts to en:tutorials:objects:creating_an_object_with_many_parts sausage
Line 5: Line 5:
 There are many ways to achieve certain behaviours in your large object. For example, you may want your boss to completely break apart on contact with a dynamic body like a missile. Or perhaps you might want the whole to stay together, and just parts of the main object to be destroyed piece by piece. There are many ways to achieve certain behaviours in your large object. For example, you may want your boss to completely break apart on contact with a dynamic body like a missile. Or perhaps you might want the whole to stay together, and just parts of the main object to be destroyed piece by piece.
  
-In the [[tutorials:weld_joint_on_objects_with_bodies|weld joint tutorial]], I showed how an object and its children (with dynamic bodies) can be joined together using weld joints so that they don't break apart on collision with another body.+In the [[en:tutorials:physics:weld_joint_on_objects_with_bodies|weld joint tutorial]], I showed how an object and its children (with dynamic bodies) can be joined together using weld joints so that they don't break apart on collision with another body.
  
 The only problem with this approach is that as the object become more complex or too large, the physics simulations becomes unstable and unreliable. You may see some strange effects at the object distorts and freaks out, to which it can't recover. The only problem with this approach is that as the object become more complex or too large, the physics simulations becomes unstable and unreliable. You may see some strange effects at the object distorts and freaks out, to which it can't recover.
Line 17: Line 17:
 Here are our assets, three sections of the mothership: Here are our assets, three sections of the mothership:
  
-{{:tutorials:boss-left.png?direct|}} {{:tutorials:boss-core.png?direct|}} {{:tutorials:boss-right.png?direct|}}+{{tutorials:physics:boss-left.png?direct|}} {{tutorials:physics:boss-core.png?direct|}} {{tutorials:physics:boss-right.png?direct|}}
  
 The boss' core, the left section and the right section. The rules for our boss object are: The boss' core, the left section and the right section. The rules for our boss object are:
Line 109: Line 109:
 Run that with physics debug mode on and you'll all three sections covered by a part (owned by the main object). Run that with physics debug mode on and you'll all three sections covered by a part (owned by the main object).
  
-{{ :tutorials:boss-physics.jpg?direct |}}+{{ tutorials:physics:boss-physics.jpg?direct |}}
  
 We'll need a projectile to hit a section of the ship. Here is an asset you can use: We'll need a projectile to hit a section of the ship. Here is an asset you can use:
  
-{{ :tutorials:projectile.png?direct |}}+{{ tutorials:physics:projectile.png?direct |}}
  
 And the config for it: And the config for it:
Line 185: Line 185:
 Compile and run. A projectile will knock the boss flying. It stays together. Great. Compile and run. A projectile will knock the boss flying. It stays together. Great.
  
-{{ :tutorials:boss-collide.jpg?direct |}}+{{ tutorials:physics:boss-collide.jpg?direct |}}
  
 The next step is to add a physics handler. Within the handler the name of the part will be checked. For example if the ''LeftBodyPart'' is hit, that body part will be destroyed, and so will the ''LeftChild'' object. The next step is to add a physics handler. Within the handler the name of the part will be checked. For example if the ''LeftBodyPart'' is hit, that body part will be destroyed, and so will the ''LeftChild'' object.
Line 258: Line 258:
 Compile and run. The projectile will strike the right hand side of the boss ship, destroy that side and the force will send the ship flying off. At the same time the remaining parts will stay joined together. Compile and run. The projectile will strike the right hand side of the boss ship, destroy that side and the force will send the ship flying off. At the same time the remaining parts will stay joined together.
  
-{{ :tutorials:boss-destroy.jpg?direct |}}+{{ tutorials:physics:boss-destroy.jpg?direct |}}
  
-This is a great technique for complex objects. Thanks to Iarwain for suggesting it in the [[https://gitter.im/orx/orx|gitter chat room]]. +This is a great technique for complex objects. Thanks to Iarwain for suggesting it in the [[https://orx-project.org/discord|chat room]]. 
en/tutorials/objects/creating_an_object_with_many_parts.1518583586.txt.gz · Last modified: 2018/02/14 00:46 (6 years ago) (external edit)