Is the any method like CollideBegin or OverlapBegin like Nape or Box2d?

32 views
Skip to first unread message

solewalker

unread,
Oct 6, 2014, 12:19:07 PM10/6/14
to haxef...@googlegroups.com
I was looking for more finer control than simple collide/overlap, in current implementation of collide/overlap there is no way to know if it's first contact or last, sometimes I see collide or overlap firing multiple times when I needed it only once. In that case overlapBegin or something like that would do just fine.

Like I have an arrow that can pierce multiple enemies. Right now it's fired many times for a single enemy. For normal bullet, I kill/disable that bullet in first call but for an arrow that is gonna exist for a longer time, it's a bit cumbersome to manage. I have an workaround right now like keeping extra info inside my objects, but I was looking for a more versatile solution. There could be other way to solve the problem but I am not aware of that.

I know nape provides better collision system, I would definitely give nape a shot in my next project. Thanks!

Gama11

unread,
Oct 6, 2014, 1:05:13 PM10/6/14
to haxef...@googlegroups.com
One thing that gives you a little more control is only doing an overlap() and then calling FlxObject.separate() yourself, if needed. That's pretty much it though, flixel's collision system is rather basic.
Reply all
Reply to author
Forward
0 new messages