Hello I have a 20 instances of same object with Bouncing ball movement (non-physical movement) following the player, i want they dont overlap between them, i want when they collision a bounce, I used fastloops but still not working, how I do this?
Hello I have a 20 instances of same object with Bouncing ball movement (non-physical movement) following the player, i want they dont overlap between them, i want when they collision a bounce, I used fastloops but still not working, how I do this?
Hi, there's probably a few ways, but when I was making a game based on Gauntlet, the best method I found to prevent instances overlapping each other was to make 4 detectors(invisible walls) around each instance. I'd then check for overlaps with a detector on the east of an instance, and a detector on the west(and north and south). So if east overlaps west, do something - and same for north & south. I'd also use fast loops and spread IDs on the detectors so they'd match the instances. Only downfall to this method is the use of lots of detectors and a few fast loops; so it can be a resource hog.
Apparently, you don't need to suffer that muchwith on-collision events:
collision_instance.mfa
what issues are you experiencing?
But I remember having same issues as Caesar says with overlapping
and using detectors to solve as well
(although you'll probably need just one-per-object in this scenario)
mmm, I fear what you ask for can hardly work fine
you want 20 objects to follow another single object,
and bounce one from the other
but bouncing means that they should stop--> aim towards a different direction --> restart
and so they can't "always" move in direction of player, at least while bouncing
if you force them to always look at player, they can't freely bounce
you can have them pushing out each other with some looping but I fear this could end up being a mess
maybe "disabling" look-at-player code for a small moment after bouncing, and reactivating shortly afterwards..?
EDIT
example:
collision_instance_bounce.mfa
Nice one that works, also sparksman did a video answering me about the same :P, here is the link https://www.youtube.com/watch?v=rqC2d_W_dHA
oh, I see... we've come to a very similar solution
if you want some less jitteryness the only way would probably be detectors & loops as Caesar said
OR
since this project seems particularly suitable for this
IF
windows or IOS only
you can try Anders Riggelsen's Flocking extension
see above example with flocking:
avoid_collision_flocking.mfa