In my game, theres a dynamic circle that launches off a static base that it is masking out(not colliding with). once it is outside its base, it changes its mask bits so it can collide with the base it launched from. (the game is basically a rectangular arena that you flick little circles into).
this works fine, except that sometimes theres another circle really close to your base, and you hit it before getting out of your base. your circle HAS to go out into the arena, it cant bounce backwards or it would ruin the game. so when it collides with something, in the collision listener i say: if it hasnt already set its mask bits to include its own base, do it now. which pops the little circle into the arena if its still within its own base.. looks a little glitchy but what can you do? its fine.
so this usually all works fine, BUT, sometimes when you flick them really fast and they collide with another little circle close to the base, and bounce back towards the base, they go inside the base for a good while before popping out. I cant really figure out why. I think it must have something to do with the fact that it all happens in one step, because there's no problem when you flick them a bit slower..
this works fine, except that sometimes theres another circle really close to your base, and you hit it before getting out of your base. your circle HAS to go out into the arena, it cant bounce backwards or it would ruin the game. so when it collides with something, in the collision listener i say: if it hasnt already set its mask bits to include its own base, do it now. which pops the little circle into the arena if its still within its own base.. looks a little glitchy but what can you do? its fine.
so this usually all works fine, BUT, sometimes when you flick them really fast and they collide with another little circle close to the base, and bounce back towards the base, they go inside the base for a good while before popping out. I cant really figure out why. I think it must have something to do with the fact that it all happens in one step, because there's no problem when you flick them a bit slower..