Skip to main content
Known Participant
September 17, 2008
Answered

Stage Dimensions as MC Boundaries

  • September 17, 2008
  • 1 reply
  • 339 views
Hi,

I just saw someone's hit test problem get solved based on two MCs being hit tested.

See Here

What is the best way to go about hit testing the stage boundaries? Say, if you want objects to bounce around the stage endlessly. Thanks.
This topic has been closed for replies.
Correct answer Rothrock
Well the stage goes from (0,0) to (Stage.width,Stage.height).

If you are bouncing around circles. You can just check if the ball is within a radius of the sides and top/bottom.

Of course if they aren't round you have to figure out a way to see which part is where. This gets a lot more complicated.

1 reply

RothrockCorrect answer
Inspiring
September 17, 2008
Well the stage goes from (0,0) to (Stage.width,Stage.height).

If you are bouncing around circles. You can just check if the ball is within a radius of the sides and top/bottom.

Of course if they aren't round you have to figure out a way to see which part is where. This gets a lot more complicated.
Known Participant
September 17, 2008
Should have thought of that. Great. Thank you very much for your help and time.