Overlap & "Collide" at the same time?
Hi, I was wondering if there was any way to have two or more actors sort of bump into each other, overlapping for a bit, and then repel away.
For example:
There are five actors all set to gather under your finger/follow your finger when you move it around the screen (so they are pretty much constrained to x,y). When you put your finger on the screen, all actors should do just that and they should even overlap a bit if circumstances call for that kind of thing, and when you move your finger around they should keep up or trail behind if you are moving too fast. But when you lift your finger from the screen, the actors should not stay clumped together/overlapped, but instead they should spring away or separate so that they are beside each other.
Much love, bromiez.
For example:
There are five actors all set to gather under your finger/follow your finger when you move it around the screen (so they are pretty much constrained to x,y). When you put your finger on the screen, all actors should do just that and they should even overlap a bit if circumstances call for that kind of thing, and when you move your finger around they should keep up or trail behind if you are moving too fast. But when you lift your finger from the screen, the actors should not stay clumped together/overlapped, but instead they should spring away or separate so that they are beside each other.
Much love, bromiez.
Best Answers
-
tenrdrmer Posts: 9,934
Well Overlap/collide is a behavior that is overridden when it conflicts whit a constrain behavior so if you are constraining everything based of mouse position x and y while mousebutton is down. then when you release your collide behavior should kick in and bounce everything back away. -
tenrdrmer Posts: 9,934
you may have to get fancy and have an actor that is always following your finger. and constrain everything based off its attributes.
Like When controller1 Linear velocity is 0 do the constrains but base it on an offset ot the mouseposition so its not completely overlapped together. other wise when controller1 Linear velocity is greater than or less than 0 do the move to rules.
Im sure its something that can be done its just something you will have to get creative to solve. GameSalad makes the process easier but by no means is making anything out of the ordinary or semi complex an easy task. you still will have to problem solve and create a system that makes it work.
Answers
So instead of constraining, I have now set them to move to x,y position of mouse at speed=300.
But the only way this works without them sticking together permanently under my finger is if I turn colide on. And the problem I have with collide if that it doesn't allow actors to overlap one bit.
I really want that overlap then spring out effect, like when actors are set to constrain with collide on and you let go of the screen.