Hello!
I am writing a RTS game using Bullet and I've got a problem regarding pathfidning (flowfield). I've implemented a case where user wants to move one group of units through another: units from first group push away those from second group and everything works fine. I would like to know how to filter collisions to prevent player's units from pushing enemy's units - they should collide, but not push each other (e.g. in chokepoints). Are normal bitmasks enough to do that? Do I have to implement collision callbacks?
Thanks!
Group movement - objects pushing filtering
-
- Posts: 225
- Joined: Wed Jan 07, 2009 11:43 am
- Location: London
Re: Group movement - objects pushing filtering
I don't think bitmasks would be enough for this as I think they're really only there for the broadphase pass - if you (didn't) set them up then you wouldn't get any collision at all.
Having a callback seems a better option, as you could then check for player v enemy movement and stop one of them?
Having a callback seems a better option, as you could then check for player v enemy movement and stop one of them?