Skip to content

Code with cross gets called multiple times, not once per collision. #59

@StarrKiss

Description

@StarrKiss

So I have bullets assigned to the filter 'cross', because they penetrate through multiple enemies. However, I've noticed that the damage for the bullets is called EVERY FRAME they are colliding with the enemy, not once per collision - if the bullet deals 3 damage and collides with an enemy for 2 frames before passing to the next one, the enemy will recieve 6 damage. A similar thing happens with the enemy attacks that have big hitboxes to the player - a attack may deal 2 damage, but if the player is in the hitbox for 5 frames it deals 10 damage. How do I fix this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions