Copy link to clipboard
Copied
I want to make the ball that I have named ball_mc bounce off the posts and bars. I want the ball_mc to bounce off the leftpost_mc in a left direction, the ball_mc bounce off rightpost_mc in a right direction, and the ball_mc bounce off the bar_mc in an upward direction. I can't seem to figure this out and the ball bounces in directions that don't make sense to me. Can someone troubleshoot this for me.
This is what I've got so far.
Is this completely wrong?
Copy link to clipboard
Copied
yes.
it's not clear what xDirection is doing but it probably should be -1 if it hits the left post and +1 if it hits the right.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now