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
63
S
26
G
26
Posts: 17
Reputation: 19,858

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
134
S
30
G
86
Posts: 5,420
Reputation: 59,526

Post » Wed Mar 09, 2016 9:19 am

super thank you ;)
B
63
S
26
G
26
Posts: 17
Reputation: 19,858


Return to How do I....?

Who is online

Users browsing this forum: Kin, ratboy3, tinhofiel and 45 guests