Closed ebrahimebrahim closed 4 years ago
I was thinking about this when seeing the phasing behavior... good idea with the solution! Maybe it can wait a signal sent of one rock exiting the other.
On Thu, Sep 24, 2020, 10:37 ebrahimebrahim notifications@github.com wrote:
This issue was caused by my solution to #2 https://github.com/ebrahimebrahim/knock-the-rock/issues/2
To see it, throw a rock in challenge mode, then hold the other rock while waiting for a new spawn As soon as the new spawn arrives, move your held rock inside of it. It should phase through. After a moment, they will both be in the same collision layer, and they will be very unhappy rocks.
This was actually intended behavior because I thought it would be hard to do by accident. But it's not that hard to do. I've done it by accident a bunch of times.
Possible solution: keep just-spawned rocks in their just-spawned collision layer until there are no held rocks overlapping them.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ebrahimebrahim/knock-the-rock/issues/24, or unsubscribe https://github.com/notifications/unsubscribe-auth/AK6P2KT4DI4MKWKUMF2DGM3SHNKSXANCNFSM4RYMMPOA .
I think this is preeeetty much resolved. It was pretty hard to deal with and the solution isn't perfect. Right now you can carry out the procedure in the original post and things should be okay.
A circle of maximal radius inside of the newly spawned rocks is used to look for other rocks that could be in the way when the newly spawned rock wants to phase in. The circle isn't perfect, but it stops rocks from phasing in smack in the middle of another rock. I think this is sufficient, unless there are better ideas.
This issue was caused by my solution to #2
To see it, throw a rock in challenge mode, then hold the other rock while waiting for a new spawn As soon as the new spawn arrives, move your held rock inside of it. It should phase through. After a moment, they will both be in the same collision layer, and they will be very unhappy rocks.
This was actually intended behavior because I thought it would be hard to do by accident. But it's not that hard to do. I've done it by accident a bunch of times.
Possible solution: keep just-spawned rocks in their just-spawned collision layer until there are no ~held~ rocks overlapping them.