Picture Editor: Collision Mask Hotspots

This forum is currently in read-only mode.
From the Asset Store
An educational game for counting pictures. An easy to use template for developers to build larger games
  • Hi, in the next version could there be a feature that would allow a sprite's collision mask to have its own unique hot spots? In the current version, when you change the sprite's hotspot. The sprite's collsion masks hotspot automatically switches to the sprites hotspot whenever you try to change it.

  • how and why would this be useful?

  • Yeah, can't see why it would be useful either. If you absolutely must have different hotspots between the collision and the sprite, you could use containers and invisible collision objects, and give those different hotspots.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • It would be useful in making a block in the style of mario that would move up once hit and make an item fall out. Exactly like Madsters Avatar does. If I wanted to make a one of those blocks, I would make a sprite that had an animation that moves its hotspot up once hit, but I don't want to move the collision masks hotspot along with the sprite because that would cause some freaky collision glitch between mario and block if they overlap. It's useful because its convenient and because I don't want to have to make a whole other sprite just for collisions.

  • It would be useful in making a block in the style of mario that would move up once hit and make an item fall out. Exactly like Madsters Avatar does. If I wanted to make a one of those blocks, I would make a sprite that had an animation that moves its hotspot up once hit, but I don't want to move the collision masks hotspot along with the sprite because that would cause some freaky collision glitch between mario and block if they overlap. It's useful because its convenient and because I don't want to have to make a whole other sprite just for collisions.

    I think you could do that with animation frames. I'll try to draw an illustration below:

    |_| 32x32 box with hotspot at 16,16

    |_| 32x32 box on top with 32x32 (overall image=32x64) empty space below it and hotspot at 16,48

    |_|

    That should work. You can do all the animations in the middle (you'd want like 1 or 2), but you just have to remember that the hotspot must remain the same distance from the BOTTOM of the sprite.

  • I also think that would work but my only problem is, I don't want the empty space, because when you have a transparent space in a sprite it makes selecting objects with the mouse in the layout editor difficult. Its difficult because when you click on a sprite in the layout editor construct does't make distinctions between the visible part of the sprite and the transparent part of the sprite. For example if you have a 300 x 300 sprite that has a small 10 x 10 rectange in the middle and you click on the transparent part of the sprite construct will select the whole object which could cause issues with designing levels. I still think it would be more conveient if sprites and their collision masks have their own individual hotspots.

  • you really really should use a separate object that does the bump. you just make the original invisible, create the proxy, make it bump and then destroy it. Your initial collider won't move and so won't its collision mask, and there won't be any fancy offsetting or weird multiplicity issues.

  • I also think that would work but my only problem is, I don't want the empty space, because when you have a transparent space in a sprite it makes selecting objects with the mouse in the layout editor difficult. Its difficult because when you click on a sprite in the layout editor construct does't make distinctions between the visible part of the sprite and the transparent part of the sprite. For example if you have a 300 x 300 sprite that has a small 10 x 10 rectange in the middle and you click on the transparent part of the sprite construct will select the whole object which could cause issues with designing levels. I still think it would be more conveient if sprites and their collision masks have their own individual hotspots.

    The transparent part would only appear in the animation frames. It would look like a normal 32x32 box the rest of the time, including in the layout window.

    Edit: Well, it is only the animation frames that are larger than 32x32. For each frame, you just add the appropiate amount of empty space (in the image frame itself in the image editor) below the sprite (32 pixels by the end of the animation). As long as you keep the hotspot 16 pixels from the bottom (remember it is getting longer), it will work perfectly.

  • I agree with both of you. Both of your solutions work fine, they just take a more time. The reason I asked for this update is because its just makes this process sooooooo much easier and faster, because I have multiple blocks that the player can hit and each of them would reveal a different item and I didn't want to create seperate objects for each and every one. If this feature never gets implemented into construct I will just have to settle with your advice. I like both of your ideas, but adding this feature would make them more efficient.

  • I think making a collision mask's hotspot separate from the sprite would be useful, but for a different reason. Right now if you move the hotspot or crop the mask down smaller than the sprite you get strange collision results.

  • I think making a collision mask's hotspot separate from the sprite would be useful, but for a different reason. Right now if you move the hotspot or crop the mask down smaller than the sprite you get strange collision results.

    I'm glad someone else agrees with this update! I'm really looking forward to see if it will make it in a future update of construct

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