Description

Add more collision boxes to your object

Example Files

CollisionBoxBehavior.capx (173 KB)

A simple use of the behavior adding 2 additionnal collision boxes.

Version History

Version Size Downloads Released
1.0 (Current)
Stable
9 KB 115 Download

Share

Download

1.0 Stable (9 KB)

Info

  • License MIT License
  • Copyright Ossama Jouini. All rights reserved.

Statistics

  • Download count 115 total downloads
  • Latest download count 115 downloads of latest version
  • Average download count 2 downloads per day average

Owners

Tags

  • 2 Comments

  • Order by
Want to leave a comment? Login or Register an account!
  • It's a nice idea but, it's for objects that have image points, and it looks like its one box per behavior. Suggestions include defining image points using x,y angle and distance at runtime, and multiple indexed instances per behavior. Then perhaps defining a poly rather than just a box, but that would be another thing most likely.

    • Well, all world objects have image points. At least one, the hotspot.

      You can already define a collision using X and Y offset from the hotspot and angle.

      Multiple collisions per behavior would just make the behavior a lot harder to use and to maintain and would probably cause a few bugs in the process. Keeping it simple helps avoid these issues.

      And even though I named it collision box, given that it actually uses a sprite for collision, it can be any collision polygon a sprite allows for. So anything that isn't a circle.