attempt to reproduce a crash with a more complex example#26
attempt to reproduce a crash with a more complex example#26ThierryBerger wants to merge 4 commits into
Conversation
| .map(|co| Entity::from_bits(co.user_data as u64)) | ||
| .or_else(|| self.deleted_colliders.get(&handle).copied()) | ||
| .expect("Internal error: entity not found for collision event.") | ||
| .get_unknown_gen(handle_index) |
There was a problem hiding this comment.
That's a possible fix: bypassing generational check. I'm not sure generation is very important for mapping colliders to entities 🤔 ; for a collider to change entity, we'd need either very cursed code, as from my understanding it would recreate a new collider within rapier (so another index).
There was a problem hiding this comment.
If my assumption is correct, we could simplify this mapping to map to index only rather than index + generation 💭 .
There was a problem hiding this comment.
That seems completely incorrect ; generation is updated when we remove an entry, so it's needed to be sure we're targeting the correct entity.
There was a problem hiding this comment.
Internal error: entity not found for collision event with collider handle: ColliderHandle(Index { index: 0, generation: 0 }). is interesting:
There shouldn't be a generation 0 ; not after the first step 🤔 (maybe even not ever?) ; it seems to mean the arena grew unexpectedly
No description provided.