• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

AS 3 Object Hit Test question

Community Beginner ,
May 20, 2012 May 20, 2012

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?

TOPICS
ActionScript

Views

842

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 20, 2012 May 20, 2012

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
May 20, 2012 May 20, 2012

Copy link to clipboard

Copied

Thank you for your advice

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
May 20, 2012 May 20, 2012

Copy link to clipboard

Copied

Many thanks

Nick Bygrave

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 20, 2012 May 20, 2012

Copy link to clipboard

Copied

LATEST

you're welcome.

p.s.  please mark helpful/correct responses, if there are any.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines