Can I define the collision box at runtime?

0 favourites
  • 3 posts
From the Asset Store
Punch the boxes as hard as you can and crush them all!
  • I have to create 60+ items, each with 4-6 frames each (not animated, just toggling between images)...

    Each object has:

    1. At rest

    2. Dragging

    3. Dropped

    4. At rest (easy mode)

    5. Dragging (easy mode)

    6. Dropped (easy mode)

    They are going to be dragged and dropped and as it's possible for the entire object to be over more than one drop zone, I need to indicate the "pointer" part of the image (frames 2 and 5) to be what makes a drop zone active... like the upper left corner 10x10 pixels.

    I can do it manually and it works just fine. However, if I create these 60 images I then have to manually edit the bounding boxes for 120 frames. Not a big deal, but if I reload the source images, they get overwritten.

    So is there a way to create a collision box at run time?

    FYI, I wanted to make a single item and create copies, but I could never get the text to look right on them, so I have to go back to graphics for this. Attaching the text to an image via Container just wasn't cutting it as the text kept having to be manually moved each time the object was moved and when physics gets involved the text was just flying around like crazy (eventually reconnecting).

    However, the fonts still looked awful and varied based on the test platform. I don't want to have to be online so webfonts wouldn't work either.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • You can't change the collision poly at runtime, but depending on your situation there might be a more efficient way to do this.

    Are all 60+ items quite distinct in their shape and desired collision polygons? If not, you're much better off using a single collision detection object that's duplicated for each item.

  • Perfect!!!! Thanks!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)