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 Nov 14, 2023
1 parent 0b82276 commit 8404287
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 @@ -98,7 +98,13 @@ static void emitCollisionEventSystem(Query<Read<Collider>> query, Read<BroadPhas
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 8404287

Please sign in to comment.