s&
newspaper
About
info
About s&box
newspaper
Latest News
published_with_changes
Changes
map
Roadmap
monitoring
Metrics
games
Games
sports_esports
Browse Games
rocket
Discover Games
business_center
Workshop
sports_esports
Games
landscape
Maps
chair
Models
texture
Materials
apparel
Clothing
construction
More..
forum
Forum
docs
Docs
docs
Documentation
dashboard
Api Reference
input
Log in with Steam
chevron_left
Change Language
简体中文
English
Русский
Español
Português-Brasil
Deutsch
日本語
Français
Polski
Türkçe
한국어
Pirate
Italiano
ไทย
繁體中文
Українська
Čeština
Nederlands
Magyar
Dansk
Suomi
Svenska
Norsk
Ελληνικά
Română
Български
Tiếng Việt
Bahasa Indonesia
Español-Latinoamérica
العربية
Api
Classes
PhysicsGroup
chevron_left
Classes
class
PhysicsGroup
search
Properties
data_object
AngularDamping
data_object
AngularVelocity
data_object
Bodies
data_object
BodyCount
data_object
Joints
data_object
LinearDamping
data_object
Mass
data_object
MassCenter
data_object
Pos
data_object
Sleeping
data_object
Velocity
data_object
World
Methods
functions
AddAngularVelocity
functions
AddVelocity
functions
ApplyAngularImpulse
functions
ApplyImpulse
functions
GetBody
functions
RebuildMass
functions
Remove
functions
SetSurface
menu
PhysicsGroup
Represents a set of <see cref="T:Sandbox.PhysicsBody">PhysicsBody</see> objects. Think ragdoll.
class
Sandbox
.
sealed
Sandbox.Engine
data_object
Properties
12
AngularDamping
float
Sets Sandbox.PhysicsBody.AngularDamping on all bodies in this group.
AngularVelocity
Vector3
Sets Sandbox.PhysicsBody.AngularVelocity on all bodies of this group.
Bodies
IEnumerable`1
Returns all physics bodies that belong to this physics group.
BodyCount
int
Returns amount of physics bodies that belong to this physics group.
Joints
IEnumerable`1
Any and all joints that are attached to any body in this group.
LinearDamping
float
Sets Sandbox.PhysicsBody.LinearDamping on all bodies in this group.
Mass
float
The total mass of all the
dynamic
PhysicsBodies
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
Vector3
Returns the center of mass for this group of physics bodies.
Pos
Vector3
Returns position of the first physics body of this group, or zero vector if it has none.
Sleeping
bool
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
Vector3
Sets Sandbox.PhysicsBody.Velocity on all bodies of this group.
World
PhysicsWorld
The world in which this group belongs
functions
Methods
8
AddAngularVelocity
(
vel
)
Adds given amount of angular velocity to all physics bodies in this group.
AddVelocity
(
vel
)
Adds given amount of velocity (Sandbox.PhysicsBody.ApplyForce(Vector3)) to all physics bodies in this group.
ApplyAngularImpulse
(
vel
,
withMass
)
Adds given amount of angular linear impulse (Sandbox.PhysicsBody.ApplyAngularImpulse(Vector3)) to all physics bodies in this group.
ApplyImpulse
(
vel
,
withMass
)
Adds given amount of linear impulse (Sandbox.PhysicsBody.ApplyImpulse(Vector3)) to all physics bodies in this group.
GetBody
(
groupIndex
)
PhysicsBody
Gets a Sandbox.PhysicsBody at given index within this physics group. See Sandbox.PhysicsGroup.BodyCount.
RebuildMass
(
)
Calls Sandbox.PhysicsBody.RebuildMass on all bodies of this group.
Remove
(
)
Delete this group, and all of its bodies
SetSurface
(
name
)
Sets the physical properties of each
PhysicsShape
of this group.
people
Log in to reply
You can't reply if you're not logged in. That would be crazy.