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

Can I change the bounding box of a symbol?

New Here ,
Dec 17, 2009 Dec 17, 2009

Hi, I'm trying to do collision detection for my game, but I don't necessarily like the premade methods hitTestObject or hitTestPoint just as they are.  I've been searching all over the place for how to change the bounding box of a symbol, but all I found was how to get its bounding box.  I'm aware of the pixel perfect collision detection code out there, but I'm looking to use bounding boxes for certain classes.

Is it possible to change the symbol's bounding box and still have that box recognized by hitTestObject or hitTestPoint?   If not, I might have to write my own colllision detection code.  =/ 

Thanks in advance.

TOPICS
ActionScript
2.8K
Translate
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

correct answers 1 Correct answer

Engaged , Dec 17, 2009 Dec 17, 2009

Hi, Sylvandyr!

You can't change the objects bounding box. But you can create a shape inside it. Then, check the hitTest with this shape instead of testing the movieclip.

Cheers,

CaioToOn!

Translate
Engaged ,
Dec 17, 2009 Dec 17, 2009

Hi, Sylvandyr!

You can't change the objects bounding box. But you can create a shape inside it. Then, check the hitTest with this shape instead of testing the movieclip.

Cheers,

CaioToOn!

Translate
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
New Here ,
Dec 17, 2009 Dec 17, 2009
LATEST

That'll work.  Thank you!


Translate
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