Bullet collision not working?

  • Ok, so I know why its not working, I just don't know how to fix it. The problem is that the bullet is travelling 73152 pixels per second due to the fact that that is how fast an actual 9x19mm parabellum travels according to the scale of my game. The problem is that the game runs at 60 fps so 73152/60=1219.2 pixels skipped per frame. Now, my "baddies" are only 100+- pixels in length. so chances are that the bullet would skip right over it. How would I get the collision detection to detect it while having it still travel at that speed?

  • Either increase the "width" of your enemies or make another detector object that is pinned to each of your enemies (which basically tries to do the first idea I said without changing your enemies' width directly)

    so if you use 2nd idea, check if bullet detects either enemy or detector object

    use pinnedUID to check which detector object belongs to which enemy

  • the problem with that is that then if i stand to the right of my enemy and shoot behind him, missing him completely, it will register as a hit.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • any ideas? is there possibly a library that has more advanced collision detection?

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)