User Tools

Site Tools


en:tutorials:physics:weld_joint_on_objects_with_bodies

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:weld_joint_on_objects_with_bodies [2018/02/13 20:46 (6 years ago)] – ↷ Page moved from tutorials:weld_joint_on_objects_with_bodies to en:tutorials:weld_joint_on_objects_with_bodies iarwainen:tutorials:physics:weld_joint_on_objects_with_bodies [2020/08/21 06:02 (4 years ago)] (current) – ↷ Page moved from en:tutorials:weld_joint_on_objects_with_bodies to en:tutorials:physics:weld_joint_on_objects_with_bodies sausage
Line 15: Line 15:
  
  
-{{ :tutorials:ship-cone.png |}} {{ :tutorials:ship.png |}} {{ :tutorials:projectile.png |}}+{{ tutorials:physics:ship-cone.png |}} {{ tutorials:physics:ship.png |}} {{ tutorials:physics:projectile.png |}}
  
 First, we'll start with setting the physics, and the gravity and turning on the bodies for debug: First, we'll start with setting the physics, and the gravity and turning on the bodies for debug:
Line 38: Line 38:
 Pivot         = center Pivot         = center
 Smoothing     = true Smoothing     = true
- 
-[WeldJoint] 
-Type = weld 
-ParentAnchor = (0, -32, 0) 
-ChildAnchor = (0, 0, 0) 
-Collide = false 
  
 [ShipBody] [ShipBody]
Line 135: Line 129:
 Let's run that.  Let's run that. 
  
-{{ :tutorials:collide-no-weld.png |}}+{{ tutorials:physics:collide-no-weld.png |}}
  
 //(The image above shows the projectile hitting the ship, but with physics debug off for clarity)// //(The image above shows the projectile hitting the ship, but with physics debug off for clarity)//
Line 171: Line 165:
 Run again, and the projectile will first strike between the main body of the ship and the child section of the ship, and will send the whole spinning. But the ship stays together as a whole unit. Run again, and the projectile will first strike between the main body of the ship and the child section of the ship, and will send the whole spinning. But the ship stays together as a whole unit.
  
-{{ :tutorials:collide-weld.png |}}+{{ tutorials:physics:collide-weld.png |}} 
 + 
 + 
 + 
 +===== Troubleshooting ===== 
 + 
 +Avoid using: 
 + 
 +<code ini> 
 +Density = 0 
 +</code>
  
 +in a child BodyPart. The effect will be to remove rotation when a projectile hits any of the bodies. 
  
en/tutorials/physics/weld_joint_on_objects_with_bodies.1518583593.txt.gz · Last modified: 2018/02/14 00:46 (6 years ago) (external edit)