This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext 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 iarwain | en: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: | + | {{ tutorials:physics: |
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 | Smoothing | ||
- | |||
- | [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: | + | {{ tutorials:physics: |
//(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: | + | {{ tutorials:physics: |
+ | |||
+ | |||
+ | |||
+ | ===== Troubleshooting ===== | ||
+ | |||
+ | Avoid using: | ||
+ | |||
+ | <code ini> | ||
+ | Density = 0 | ||
+ | </ | ||
+ | in a child BodyPart. The effect will be to remove rotation when a projectile hits any of the bodies. | ||