bullet disappears

Get help using Construct 2

Post » Wed Mar 09, 2016 7:04 am

Hi guys

I have a problem missile which has a speed of 2,000 such collisions randomly disappear when you do not know why?

https://www.dropbox.com/s/zfhc1ifltp7hrc1/bullet.capx?dl=0

thank you very much
B
64
S
26
G
26
Posts: 17
Reputation: 19,883

Post » Wed Mar 09, 2016 8:26 am

This is a quite common mistake, and has been explained many times before, but here goes......

You need to understand that, with a speed of 2000 pixels per second, the bullet will be travelling at over 33 pixels per tick - 2000/60.

That means that the bullet will travel over 33 pixels when the program performs a collision check, which happens each tick.

As the solid border is only 30 pixels wide, it is obvious that at some ticks, the bullet will have travelled right through the border in 1 tick, therefore looking like it moves through the boundary.

The quick answer is to either slow the bullet or increase the size of the borders.
If your vision so exceeds your ability, then look to something closer.
Moderator
B
145
S
33
G
89
Posts: 5,908
Reputation: 62,579

Post » Wed Mar 09, 2016 9:19 am

super thank you ;)
B
64
S
26
G
26
Posts: 17
Reputation: 19,883


Return to How do I....?

Who is online

Users browsing this forum: JoniArtha and 5 guests