How do I create a collision without any problem

Get help using Construct 2

Post » Tue Sep 09, 2014 2:45 am

Hi
I have a problem with "on collision" event
it doesn't work sometimes
I have an object that moves with "Custom Movement" behavior (for example x) and another object that moves with "Drag and Drop" behavior (y)
I set an event that when object x is on collision with object y, object x destroys itself
but sometimes it doesn't work, specially in mobile devices (I used cocoonjs, iPod 4G)
please tell me how to fix this.
B
9
S
2
Posts: 95
Reputation: 1,019

Post » Tue Sep 09, 2014 2:52 am

I don't understand how it's not working...

you mean something like that?

Image
B
22
S
6
Posts: 244
Reputation: 2,710

Post » Tue Sep 09, 2014 3:06 am

yes
it works most of the times, but sometimes it doesn't work
I found this tutorial
https://www.scirra.com/tutorials/973/pi ... th-bullets
is there any way I can fix it or I use this tutorial?
B
9
S
2
Posts: 95
Reputation: 1,019

Post » Tue Sep 09, 2014 3:34 am

I don't know, this have never happened to me before, maybe you're doing something wrong in the event sheet, try re-doing your events and expirement.
B
22
S
6
Posts: 244
Reputation: 2,710

Post » Tue Sep 09, 2014 3:50 am

when the speed of object x is so much for example 10000, it would happen
you can test it
B
9
S
2
Posts: 95
Reputation: 1,019

Post » Tue Sep 09, 2014 4:05 am

Heska wrote:when the speed of object x is so much for example 10000, it would happen
you can test it

That is probably too fast if you have a considerably small area of collision, the collision check might have been missed, in such a way that the bullet "teleported" just in front of the collision area, and the engine redraw the next tick at the back of the collision area.

Conclusion: High speed bullet don't work well with small collision area.
B
28
S
8
G
4
Posts: 553
Reputation: 4,924

Post » Tue Sep 09, 2014 4:12 am

when the speed is 10000 it doesn't work and I just said it for @Wisdoms
my object max speed is 500 and it works most of the times
for example in my pc 1 out of 100 doesn't work but in my ipod 4G 1 out of 10 doesn't work
and I didn't use bullet behavior, i used custom movement
there isn't any way to fix it and I have to use this tutorial?
https://www.scirra.com/tutorials/973/pi ... th-bullets
B
9
S
2
Posts: 95
Reputation: 1,019

Post » Tue Sep 09, 2014 4:38 am

I think if you post a Capx i could help you.
B
22
S
6
Posts: 244
Reputation: 2,710

Post » Tue Sep 09, 2014 4:41 am

Heska wrote:my pc 1 out of 100 doesn't work but in my ipod 4G 1 out of 10 doesn't work

PC is always better than mobile in terms of processing power, the hardware limits the performance on how many tick/second it can reach. It will behave the same if the mobile version of your game can match the performance you see on pc.
B
28
S
8
G
4
Posts: 553
Reputation: 4,924


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 26 guests