Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion modules/godot_physics_2d/godot_body_2d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,8 @@ void GodotBody2D::set_active(bool p_active) {
if (mode == PhysicsServer2D::BODY_MODE_STATIC) {
// Static bodies can't be active.
active = false;
} else if (get_space()) {
}
if (get_space()) {
get_space()->body_add_to_active_list(&active_list);
}
} else if (get_space()) {
Expand Down
2 changes: 1 addition & 1 deletion modules/godot_physics_2d/godot_body_2d.h
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ class GodotBody2D : public GodotCollisionObject2D {
_FORCE_INLINE_ bool is_active() const { return active; }

_FORCE_INLINE_ void wakeup() {
if ((!get_space()) || mode == PhysicsServer2D::BODY_MODE_STATIC || mode == PhysicsServer2D::BODY_MODE_KINEMATIC) {
if ((!get_space()) || mode == PhysicsServer2D::BODY_MODE_KINEMATIC) {
return;
}
set_active(true);
Expand Down