Copy link to clipboard
Copied
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.
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!
Copy link to clipboard
Copied
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!
Copy link to clipboard
Copied
That'll work. Thank you!
Find more inspiration, events, and resources on the new Adobe Community
Explore Now