How do I make 2 actors collide but only one bounce?
dabbuhl
Member, PRO Posts: 52
I have a game where there is 2 actors. Actor #1 goes to the top of the screen to fill up the play field. Actor #2 will move through the play field. What I want is for actor #1 to bounce off of actor #2 but actor #2 will act as if it hasn't touched anything. I can set the density to 10,000 on actor #2 but when the field is full of actor #1s, actor 2 will change its direction slightly.
Comments
Hey @dabbuhl,
To achieve this what I would do is in actor 2 under physics, uncheck it's Movable. Then what you can do to actor 2 to get him to move is use Interpolate. Also just a heads up, you cannot interrupt Interpolate so to be able to achieve this, give actor 2 a real attribute. Call it something like "duration". Set this to a number and in the Interpolate rule in the duration section, call it's self.duration attribute.
Then when you want it to stop in mid movement just change it's self.duration to 0 and it will interrupt it. When you want it to move again, change it's self.duration to a number. Hope that makes sense and hope the helps achieve what you want.
It's hard for me to know exactly if this will work for you because I am not sure how your game works.
I could offer you a solution to this but I'm pretty sure as soon as I do you will add various caveats !
Here's an example of what you describe: (attached)