Skip to content

Commit

Permalink
refactor(physics): remove BoxCollisionShape::changed from reflection
Browse files Browse the repository at this point in the history
  • Loading branch information
RiscadoA committed Oct 13, 2024
1 parent 9ea0c0a commit 4545275
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 17 deletions.
2 changes: 1 addition & 1 deletion engine/include/cubos/engine/collisions/shapes/box.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ namespace cubos::engine

cubos::core::geom::Box box; ///< Box shape.

bool changed = true;
bool changed{true};
};
} // namespace cubos::engine
15 changes: 6 additions & 9 deletions engine/samples/complex_physics/assets/scenes/red_cube.cubos
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,14 @@
"entities": {
"cube": {
"cubos::engine::AccumulatedCorrection": {
"x": 0.0,
"y": 0.0,
"z": 0.0
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"cubos::engine::BoxCollisionShape": {
"box" : {
"x": 0.5,
"y": 0.5,
"z": 0.5
},
"changed" : true
"x": 0.5,
"y": 0.5,
"z": 0.5
},
"cubos::engine::Collider": {
"a": {
Expand Down
9 changes: 3 additions & 6 deletions engine/samples/complex_physics/assets/scenes/white_cube.cubos
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,9 @@
"z": 0.0
},
"cubos::engine::BoxCollisionShape": {
"box" : {
"x": 0.5,
"y": 0.5,
"z": 0.5
},
"changed" : true
"x": 0.5,
"y": 0.5,
"z": 0.5
},
"cubos::engine::Collider": {
"a": {
Expand Down
1 change: 0 additions & 1 deletion engine/src/collisions/interface/shapes/box.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,5 @@ CUBOS_REFLECT_IMPL(cubos::engine::BoxCollisionShape)
{
return core::ecs::TypeBuilder<BoxCollisionShape>("cubos::engine::BoxCollisionShape")
.withField("box", &BoxCollisionShape::box)
.withField("changed", &BoxCollisionShape::changed)
.build();
}

0 comments on commit 4545275

Please sign in to comment.