Skip to content

Commit

Permalink
fix(collisions): set correct event fields order
Browse files Browse the repository at this point in the history
  • Loading branch information
RiscadoA committed Jan 29, 2024
1 parent 4522bca commit 24d3788
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion engine/src/cubos/engine/collisions/plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,13 @@ static void emitCollisionEventSystem(Query<const Collider&> query, const BroadPh
pos.z = c1.z + (b1.halfSize.z * s.z);
}

events.push(CollisionEvent{ent1, ent2, penetration, normal, pos});
events.push(CollisionEvent{
.entity = ent1,
.other = ent2,
.penetration = penetration,
.position = pos,
.normal = normal,
});
}
}

Expand Down

0 comments on commit 24d3788

Please sign in to comment.