# Sandbox.PhysicsGroup

Represents a set of [PhysicsBody](/api/Sandbox.PhysicsBody) objects. Think ragdoll.

- Kind: class
- Namespace: `Sandbox`
- Assembly: `Sandbox.Engine`
- Modifiers: sealed

## Properties

- [`AngularDamping`](/api/Sandbox.PhysicsGroup/AngularDamping): Sets [Sandbox.PhysicsBody.AngularDamping](/api/Sandbox.PhysicsBody/AngularDamping) on all bodies in this group.
- [`AngularVelocity`](/api/Sandbox.PhysicsGroup/AngularVelocity): Sets [Sandbox.PhysicsBody.AngularVelocity](/api/Sandbox.PhysicsBody/AngularVelocity) on all bodies of this group.
- [`Bodies`](/api/Sandbox.PhysicsGroup/Bodies): Returns all physics bodies that belong to this physics group.
- [`BodyCount`](/api/Sandbox.PhysicsGroup/BodyCount): Returns amount of physics bodies that belong to this physics group.
- [`Joints`](/api/Sandbox.PhysicsGroup/Joints): Any and all joints that are attached to any body in this group.
- [`LinearDamping`](/api/Sandbox.PhysicsGroup/LinearDamping): Sets [Sandbox.PhysicsBody.LinearDamping](/api/Sandbox.PhysicsBody/LinearDamping) on all bodies in this group.
- [`Mass`](/api/Sandbox.PhysicsGroup/Mass): The total mass of all the dynamic[PhysicsBodies](/api/Sandbox.PhysicsBody) in this group. When setting the total mass, it will be set on each body proportionally to each of their old masses, i.e. if a body had 25% of previous total mass, it will have 25% of new total mass.
- [`MassCenter`](/api/Sandbox.PhysicsGroup/MassCenter): Returns the center of mass for this group of physics bodies.
- [`Pos`](/api/Sandbox.PhysicsGroup/Pos): Returns position of the first physics body of this group, or zero vector if it has none.
- [`Sleeping`](/api/Sandbox.PhysicsGroup/Sleeping): Physics bodies automatically go to sleep after a certain amount of time of inactivity to save on performance. You can use this to wake the body up, or prematurely send it to sleep.
- [`Velocity`](/api/Sandbox.PhysicsGroup/Velocity): Sets [Sandbox.PhysicsBody.Velocity](/api/Sandbox.PhysicsBody/Velocity) on all bodies of this group.
- [`World`](/api/Sandbox.PhysicsGroup/World): The world in which this group belongs

## Methods

- [`AddAngularVelocity`](/api/Sandbox.PhysicsGroup/AddAngularVelocity): Adds given amount of angular velocity to all physics bodies in this group.
- [`AddVelocity`](/api/Sandbox.PhysicsGroup/AddVelocity): Adds given amount of velocity ([Sandbox.PhysicsBody.ApplyForce](/api/Sandbox.PhysicsBody/ApplyForce)) to all physics bodies in this group.
- [`ApplyAngularImpulse`](/api/Sandbox.PhysicsGroup/ApplyAngularImpulse): Adds given amount of angular linear impulse ([Sandbox.PhysicsBody.ApplyAngularImpulse](/api/Sandbox.PhysicsBody/ApplyAngularImpulse)) to all physics bodies in this group.
- [`ApplyImpulse`](/api/Sandbox.PhysicsGroup/ApplyImpulse): Adds given amount of linear impulse ([Sandbox.PhysicsBody.ApplyImpulse](/api/Sandbox.PhysicsBody/ApplyImpulse)) to all physics bodies in this group.
- [`GetBody`](/api/Sandbox.PhysicsGroup/GetBody): Gets a [Sandbox.PhysicsBody](/api/Sandbox.PhysicsBody) at given index within this physics group. See [Sandbox.PhysicsGroup.BodyCount](/api/Sandbox.PhysicsGroup/BodyCount).
- [`RebuildMass`](/api/Sandbox.PhysicsGroup/RebuildMass): Calls [Sandbox.PhysicsBody.RebuildMass](/api/Sandbox.PhysicsBody/RebuildMass) on all bodies of this group.
- [`Remove`](/api/Sandbox.PhysicsGroup/Remove): Delete this group, and all of its bodies
- [`SetSurface`](/api/Sandbox.PhysicsGroup/SetSurface): Sets the physical properties of each [PhysicsShape](/api/Sandbox.PhysicsShape) of this group.
