Bullet collision not working?

Get help using Construct 2

Post » Tue Apr 29, 2014 11:23 am

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?
B
3
Posts: 3
Reputation: 431

Post » Tue Apr 29, 2014 11:26 am

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
B
16
S
7
Posts: 301
Reputation: 2,726

Post » Tue Apr 29, 2014 11:29 am

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.
B
3
Posts: 3
Reputation: 431

Post » Tue Apr 29, 2014 12:19 pm

any ideas? is there possibly a library that has more advanced collision detection?
B
3
Posts: 3
Reputation: 431


Return to How do I....?

Who is online

Users browsing this forum: jorgmaquoi and 13 guests