MCPcopy Create free account
hub / github.com/ByteArena/box2d / MakeB2BodyDef

Function MakeB2BodyDef

DynamicsB2Body.go:82–99  ·  view source on GitHub ↗

This constructor sets the body definition default values.

()

Source from the content-addressed store, hash-verified

80
81/// This constructor sets the body definition default values.
82func MakeB2BodyDef() B2BodyDef {
83 return B2BodyDef{
84 UserData: nil,
85 Position: MakeB2Vec2(0, 0),
86 Angle: 0.0,
87 LinearVelocity: MakeB2Vec2(0, 0),
88 AngularVelocity: 0.0,
89 LinearDamping: 0.0,
90 AngularDamping: 0.0,
91 AllowSleep: true,
92 Awake: true,
93 FixedRotation: false,
94 Bullet: false,
95 Type: B2BodyType.B2_staticBody,
96 Active: true,
97 GravityScale: 1.0,
98 }
99}
100
101func NewB2BodyDef() *B2BodyDef {
102 res := MakeB2BodyDef()

Callers 1

NewB2BodyDefFunction · 0.85

Calls 1

MakeB2Vec2Function · 0.85

Tested by

no test coverage detected