MCPcopy Create free account
hub / github.com/WolfireGames/overgrowth / SetGravity

Method SetGravity

Source/Graphics/skeleton.cpp:152–170  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

150}
151
152void Skeleton::SetGravity(bool enable) {
153 if (enable) {
154 for (auto &physics_bone : physics_bones) {
155 if (!physics_bone.bullet_object) {
156 continue;
157 }
158 physics_bone.bullet_object->SetGravity(true);
159 // physics_bones[i].bullet_object->SetDamping(0.0f);
160 }
161 } else {
162 for (auto &physics_bone : physics_bones) {
163 if (!physics_bone.bullet_object) {
164 continue;
165 }
166 physics_bone.bullet_object->SetGravity(false);
167 // physics_bones[i].bullet_object->SetDamping(1.0f);
168 }
169 }
170}
171
172void Skeleton::UnlinkFromBulletWorld() {
173 for (auto &physics_bone : physics_bones) {

Callers 3

CreatePhysicsSkeletonMethod · 0.45
LoadLevelDataMethod · 0.45
LoadMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected