Copy link to clipboard
Copied
I am working on a tennis game. I have designed a two -dimensional court with each of the individual parts of the court (eg right service court) as an instance of a movie clip. I want to distort the court so that the far end looks farther away - the court becomes a trapezium. When detecting whether the ball lands on a particular court section, is the hit test done on the original two-dimensional shape or on the distorted shape?
Copy link to clipboard
Copied
unless you use the bitmapdata hittest, you'll be checking for a hit of the bounding rectangle and it does not matter what the original shape is. if you want a pixel-perfect hittest, you'll need to use the bitmapdata hittest.
Copy link to clipboard
Copied
Thank you for your advice
Copy link to clipboard
Copied
Many thanks
Nick Bygrave
Copy link to clipboard
Copied
you're welcome.
p.s. please mark helpful/correct responses, if there are any.