Replies: 3 comments 4 replies
-
I see you use kinematic bodies. A kinematic body is not affected by other rigid bodies. |
Beta Was this translation helpful? Give feedback.
-
Make sure to add a I am open to feedback on how to improve the clarity/intuitiveness of that aspect though. Maybe through better/more discoverable documentation? And/Or maybe a better default restitution value? Or any other suggestion? On another topic, that comment: https://github.com/ottermata/heron-collision-test/blob/master/src/main.rs#L120 which says "crash sometimes". Do you have a stack trace? It should definitely not crash (IMO), though it is not yet clear if it is a problem of bevy or heron, |
Beta Was this translation helpful? Give feedback.
-
Workaround solution until there is a fix: |
Beta Was this translation helpful? Give feedback.
-
I've just started playing around with bevy and wanted to add physics to my test project. As I was changing things over I encountered a weird bug, where some physics objects were not being removed properly. I tried changing the hit detection over to the collision event listener, but that had the same issues. After moving the system around a bit the bug went away, but then there was no knock back effect when the projectiles hit the enemy.
I have created a short example showcasing the different behaviors here: https://github.com/ottermata/heron-collision-test
These systems both suffer from the same issues:
projectile_collision_event
: check projectile hits with collision eventsprojectile_collide_check
: check projectile hits with transform collide checkWhen in the Update stage, the physics seem to be mostly ignored. Every now and then they slightly push or rotate the enemy.
When in the PostUpdate stage, they push the enemy away and don't correctly despawn.
While I was creating that test I saw the Collisions component which seems to not have these issues, so I will probably just use that. (
projectile_collision_check
system)It would be nice to know why the collision is being registered, without resulting in physics changes. Since it looks like a bug to me, I have opened this issue.
Maybe an example of how something like this is supposed to be implemented would be helpful for newcomers, feel free to use my code as a base for that.
Beta Was this translation helpful? Give feedback.
All reactions