mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
fix: sensors list not clearing
This commit is contained in:
parent
7d09a7957c
commit
0fe0cc5829
1 changed files with 2 additions and 1 deletions
|
|
@ -287,6 +287,7 @@ void Entities::preparePhysics(float delta) {
|
|||
auto parts = sensorsTickClock.getParts();
|
||||
|
||||
auto& sensors = physics.getSensorsWriteable();
|
||||
sensors.clear();
|
||||
|
||||
auto view = registry->view<EntityId, Transform, Rigidbody>();
|
||||
for (auto [entity, eid, transform, rigidbody] : view.each()) {
|
||||
|
|
@ -339,7 +340,7 @@ void Entities::updatePhysics(float delta) {
|
|||
hitbox.scale = transform.size;
|
||||
if (util::is_nan_or_inf(hitbox.position)) {
|
||||
logger.error()
|
||||
<< "something bad happened in physics engine (entity "
|
||||
<< "physics simulation produced nan or inf (entity "
|
||||
<< eid.def.name << "#" << eid.uid << ")";
|
||||
hitbox.position = transform.pos;
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue