Collision detection failing

Post your own tutorials, guides and demos.

Post » Mon Dec 29, 2008 12:01 am

Im pretty sure the bullet/turret behavior has nothing to do with collision detection, but used together Im getting a lot of "misses".
Note:
Accuracy is set to 0(best)
You will have to move around some. Some places it works, some it doesn't.

Any ways Im posting this as I may be missing something, and Im unsure if this is a bug.[attachment=0:38g1sqhc]collisiondetection.cap[/attachment:38g1sqhc]
Image Image
B
161
S
48
G
90
Posts: 7,350
Reputation: 66,755

Post » Mon Dec 29, 2008 12:47 am

Change "On Collision With" to "Is Overlapping". The reason for the misses is that the collision event only registers once until the colliding object is out. Unfortunately, this means if one bullet is still overlapping the target when another collides, it won't register the other bullet's collision because they're both the same object.

Hope I explained that well enough, and I hope I'm right about the "On Collision" event. :P
Moderator
B
98
S
37
G
19
Posts: 1,584
Reputation: 17,817

Post » Mon Dec 29, 2008 1:25 am

Ahh ok, got it.
Its working now, thanks.
Image Image
B
161
S
48
G
90
Posts: 7,350
Reputation: 66,755

Post » Mon Dec 29, 2008 1:26 am

Yeah, there's a bug that On Collision won't register if another object of the same type is already overlapping that object... linkman's workaround should do the trick until a fix is implemented.
Scirra Founder
B
359
S
214
G
72
Posts: 22,951
Reputation: 178,578

Post » Sun Jan 04, 2009 8:55 am

Hey this is a perfectly good opportunity to pull out the old standby:
"It's not a bug ... it's a feature."
B
3
S
2
G
4
Posts: 271
Reputation: 2,017


Return to Your tutorials & example files

Who is online

Users browsing this forum: No registered users and 1 guest