Table of Contents

Enum PhysicsServer2D.BodyParameter

Namespace
Godot
Assembly
GodotSharp.dll
public enum PhysicsServer2D.BodyParameter : long

Fields

AngularDamp = 9

Constant to set/get a body's angular damping factor. The default value of this parameter is 0.0.

AngularDampMode = 7

Constant to set/get a body's angular damping mode. See PhysicsServer2D.BodyDampMode for possible values. The default value of this parameter is Combine.

Bounce = 0

Constant to set/get a body's bounce factor. The default value of this parameter is 0.0.

CenterOfMass = 4

Constant to set/get a body's center of mass position in the body's local coordinate system. The default value of this parameter is Vector2(0,0). If this parameter is never set explicitly, then it is recalculated based on the body's shapes when setting the parameter Mass or when calling BodySetSpace(Rid, Rid).

Friction = 1

Constant to set/get a body's friction. The default value of this parameter is 1.0.

GravityScale = 5

Constant to set/get a body's gravity multiplier. The default value of this parameter is 1.0.

Inertia = 3

Constant to set/get a body's inertia. The default value of this parameter is 0.0. If the body's inertia is set to a value <= 0.0, then the inertia will be recalculated based on the body's shapes, mass, and center of mass.

LinearDamp = 8

Constant to set/get a body's linear damping factor. The default value of this parameter is 0.0.

LinearDampMode = 6

Constant to set/get a body's linear damping mode. See PhysicsServer2D.BodyDampMode for possible values. The default value of this parameter is Combine.

Mass = 2

Constant to set/get a body's mass. The default value of this parameter is 1.0. If the body's mode is set to Rigid, then setting this parameter will have the following additional effects:

- If the parameter CenterOfMass has never been set explicitly, then the value of that parameter will be recalculated based on the body's shapes.

- If the parameter Inertia is set to a value <= 0.0, then the value of that parameter will be recalculated based on the body's shapes, mass, and center of mass.

Max = 10

Represents the size of the PhysicsServer2D.BodyParameter enum.