Skip to content

Commit c493b11

Browse files
committed
Setting 2d body to be default dynamic
1 parent f9ff698 commit c493b11

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

engine/core/object/physics/Body2D.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ b2BodyType getBodyTypeToB2(BodyType type){
2020
return b2_dynamicBody;
2121
}
2222

23-
return b2_staticBody;
23+
return b2_dynamicBody;
2424
}
2525

2626
BodyType getB2ToBodyType(b2BodyType type){
@@ -32,7 +32,7 @@ BodyType getB2ToBodyType(b2BodyType type){
3232
return BodyType::DYNAMIC;
3333
}
3434

35-
return BodyType::STATIC;
35+
return BodyType::DYNAMIC;
3636
}
3737

3838
Vector2 getB2ToVector2(b2Vec2 vec2){

engine/core/subsystem/PhysicsSystem.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -735,6 +735,7 @@ bool PhysicsSystem::loadBody2D(Entity entity){
735735
bodyDef.userData.pointer = entity;
736736

737737
body.body = world2D->CreateBody(&bodyDef);
738+
body.body->SetType(b2_dynamicBody);
738739
body.newBody = true;
739740

740741
return true;

0 commit comments

Comments
 (0)