# SHingeJoint

**الأعضاء** 22

|       |                                                               |                                                                                                                                              |
| ----- | ------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
| خاصية | [ConnectedBody](#connectedbody)                               | Set joint to a rigidbody.                                                                                                                    |
| خاصية | [Axis](#axis)                                                 | The direction of the axis around which the body swings.                                                                                      |
| خاصية | [Anchor](#anchor)                                             | The position of the axis around which the body swings.                                                                                       |
| خاصية | [ConnectedAnchor](#connectedanchor)                           | Manual configuration of the connected anchor position.                                                                                       |
| خاصية | [AutoConfigureConnectedAnchor](#autoconfigureconnectedanchor) | If this is enabled, then the Connected Anchor position will be calculated automatically to match the global position of the anchor property. |
| خاصية | [BreakForce](#breakforce)                                     | Apply the force to break the joint.                                                                                                          |
| خاصية | [BreakTorque](#breaktorque)                                   | Apply the torque to break the joint.                                                                                                         |
| خاصية | [EnableCollision](#enablecollision)                           | When checked, this enables collisions between bodies connected with a joint.                                                                 |
| خاصية | [EnablePreprocessing](#enablepreprocessing)                   | Disabling preprocessing helps to stabilize impossible-to-fulfil configurations.                                                              |
| خاصية | [CurrentForce](#currentforce)                                 | The force applied by the solver to satisfy all constraints.                                                                                  |
| خاصية | [CurrentTorque](#currenttorque)                               | The torque applied by the solver to satisfy all constraints.                                                                                 |
| خاصية | [MassScale](#massscale)                                       | The scale to apply to the inverse mass and inertia tensor of the body                                                                        |
| خاصية | [ConnectedMassScale](#connectedmassscale)                     | The scale to apply to the inverse mass and inertia tensor of the connected body                                                              |
| خاصية | [Motor](#motor)                                               | The motor makes the object spin around.                                                                                                      |
| خاصية | [Limits](#limits)                                             | The motor makes the object spin around.                                                                                                      |
| خاصية | [Spring](#spring)                                             | The motor makes the object spin around.                                                                                                      |
| خاصية | [UseMotor](#usemotor)                                         | The motor makes the object spin around.                                                                                                      |
| خاصية | [UseLimits](#uselimits)                                       | If enabled, the angle of the hinge will be restricted within the Min & Max values.                                                           |
| خاصية | [UseSpring](#usespring)                                       | Spring makes the Rigidbody reach for a specific angle compared to its connected body.                                                        |
| خاصية | [Velocity](#velocity)                                         | The angular velocity of the joint in degrees per second.                                                                                     |
| خاصية | [Angle](#angle)                                               | The current angle in degrees of the joint relative to its rest position.                                                                     |
| خاصية | [GameObject](#gameobject)                                     | –                                                                                                                                            |

## الخصائص

### ConnectedBody

[SRigidbody](/docs/ar/scripting/client-scripting-api-reference/components/srigidbody.md) ConnectedBody {get; set; }

Set joint to a rigidbody. If not set, the joint connects to the world.

مثال

**Lua**

```lua
connectedRigidBody = Space.Host.ExecutingObject.HingeJoint.ConnectedBody

```

### Axis

[SVector](/docs/ar/scripting/client-scripting-api-reference/types/svector.md) Axis {get; set; }

The direction of the axis around which the body swings. The direction is defined in local space.

مثال

**Lua**

```lua
Space.Host.ExecutingObject.HingeJoint.Axis = Vector.New(0,1,0)

```

### Anchor

[SVector](/docs/ar/scripting/client-scripting-api-reference/types/svector.md) Anchor {get; set; }

The position of the axis around which the body swings. The position is defined in local space.

مثال

**Lua**

```lua
Space.Host.ExecutingObject.HingeJoint.Anchor = Vector.New(0, 0.5 , 0)

```

### ConnectedAnchor

[SVector](/docs/ar/scripting/client-scripting-api-reference/types/svector.md) ConnectedAnchor {get; set; }

Manual configuration of the connected anchor position.

مثال

**Lua**

```lua
Space.Host.ExecutingObject.HingeJoint.ConnectedAnchor = Vector.New(1,1,1)

```

### AutoConfigureConnectedAnchor

bool AutoConfigureConnectedAnchor {get; set; }

If this is enabled, then the Connected Anchor position will be calculated automatically to match the global position of the anchor property. This is the default behavior. If this is disabled, you can configure the position of the connected anchor manually.

مثال

**Lua**

```lua
Space.Host.ExecutingObject.HingeJoint.AutoConfigureConnectedAnchor = false

```

### BreakForce

float BreakForce {get; set; }

Apply the force to break the joint.

مثال

**Lua**

```lua
Space.Host.ExecutingObject.HingeJoint.BreakForce = 20

```

### BreakTorque

float BreakTorque {get; set; }

Apply the torque to break the joint.

مثال

**Lua**

```lua
Space.Host.ExecutingObject.HingeJoint.BreakTorque = 1

```

### EnableCollision

bool EnableCollision {get; set; }

When checked, this enables collisions between bodies connected with a joint.

مثال

**Lua**

```lua
Space.Host.ExecutingObject.HingeJoint.EnableCollision = true

```

### EnablePreprocessing

bool EnablePreprocessing {get; set; }

Disabling preprocessing helps to stabilize impossible-to-fulfil configurations.

مثال

**Lua**

```lua
Space.Host.ExecutingObject.HingeJoint.EnablePreprocessing = true

```

### CurrentForce

[SVector](/docs/ar/scripting/client-scripting-api-reference/types/svector.md) CurrentForce {get; }

The force applied by the solver to satisfy all constraints.

مثال

**Lua**

```lua
vectorForce = Space.Host.ExecutingObject.HingeJoint.CurrentForce

```

### CurrentTorque

[SVector](/docs/ar/scripting/client-scripting-api-reference/types/svector.md) CurrentTorque {get; }

The torque applied by the solver to satisfy all constraints.

مثال

**Lua**

```lua
vectorTorque = Space.Host.ExecutingObject.HingeJoint.CurrentTorque

```

### MassScale

float MassScale {get; set; }

The scale to apply to the inverse mass and inertia tensor of the body

مثال

**Lua**

```lua
Space.Host.ExecutingObject.HingeJoint.MassScale = 2

```

### ConnectedMassScale

float ConnectedMassScale {get; set; }

The scale to apply to the inverse mass and inertia tensor of the connected body

مثال

**Lua**

```lua
Space.Host.ExecutingObject.HingeJoint.ConnectedMassScale = 2

```

### Motor

[SJointMotor](/docs/ar/scripting/client-scripting-api-reference/types/sjointmotor.md) Motor {get; set; }

The motor makes the object spin around.

مثال

**Lua**

```lua
jointMotor = Space.Host.ExecutingObject.HingeJoint.Motor 

```

### Limits

[SJointLimits](/docs/ar/scripting/client-scripting-api-reference/types/sjointlimits.md) Limits {get; set; }

The motor makes the object spin around.

مثال

**Lua**

```lua
jointLimits = Space.Host.ExecutingObject.HingeJoint.Limits

```

### Spring

[SJointSpring](/docs/ar/scripting/client-scripting-api-reference/types/sjointspring.md) Spring {get; set; }

The motor makes the object spin around.

مثال

**Lua**

```lua
jointSpring = Space.Host.ExecutingObject.HingeJoint.Spring

```

### UseMotor

bool UseMotor {get; set; }

The motor makes the object spin around.

مثال

**Lua**

```lua
Space.Host.ExecutingObject.HingeJoint.UseMotor = true

```

### UseLimits

bool UseLimits {get; set; }

If enabled, the angle of the hinge will be restricted within the Min & Max values.

مثال

**Lua**

```lua
Space.Host.ExecutingObject.HingeJoint.UseLimits = true

```

### UseSpring

bool UseSpring {get; set; }

Spring makes the Rigidbody reach for a specific angle compared to its connected body.

مثال

**Lua**

```lua
Space.Host.ExecutingObject.HingeJoint.UseSpring = true

```

### Velocity

float Velocity {get; }

The angular velocity of the joint in degrees per second.

مثال

**Lua**

```lua
floatVelocity = Space.Host.ExecutingObject.HingeJoint.Velocity

```

### Angle

float Angle {get; }

The current angle in degrees of the joint relative to its rest position.

مثال

**Lua**

```lua
floatAngle = Space.Host.ExecutingObject.HingeJoint.Angle

```

### GameObject

[SGameObject](/docs/ar/scripting/client-scripting-api-reference/types/sgameobject.md) GameObject {get; }

مثال

**Lua**

```lua
theGameObject = Space.Host.ExecutingObject.HingeJoint.GameObject

```
