© Casey Hardman  2020
C. HardmanGame Programming with Unity and C#https://doi.org/10.1007/978-1-4842-5656-5_39

39. Joints and Swings

Casey Hardman1 
(1)
West Palm Beach, FL, USA
 

This chapter will go over an example of some basic usage of a physics component called the Configurable Joint, which can be used to bind GameObjects together with the physics system. We’ll use it to create a chain of objects, each one attached to the one above it to create something like a rope. At the bottom of the rope, we’ll attach a platform that will swing with the rope. Our player can use their “telekinesis” to pull the swing or its joints and then jump on the platform to ride it.

Swing Setup

Let’s set up the GameObjects of our swing first so they’re all ready to be connected ...

Get Game Programming with Unity and C#: A Complete Beginner’s Guide now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.