Weird hotspot problem

0 favourites
  • 4 posts
From the Asset Store
For problem solving, puzzles, bubbles, platforms and other adventures.
  • Link to .capx file (required!):

    dl.dropbox.com/u/7765312/Hotspotglitch/Hotspotglitch.capx

    Steps to reproduce:

    1. Go into the .capx

    2. Check out the objects animations that's in the .capx

    3. Notice the hotspot X value is 25 on both frames (which are both the same frames, just recoloured), BUT the hotspot ICON on the image is different for each frame!

    Here's the first frame

    dl.dropbox.com/u/7765312/Hotspotglitch/gl1.png

    Here's the second, recoloured frame

    dl.dropbox.com/u/7765312/Hotspotglitch/gl2.png

    Here's the previous two images blended together to show the difference of the hotspot.

    dl.dropbox.com/u/7765312/Hotspotglitch/gl3.png

    Observed result:

    Hotspot is lying to me!

    Expected result:

    Hotspot to be placed correctly according to the number given.

    Operating system & service pack:

    Windows 7 Home Edition 64 bit

    Construct 2 version:

    [R117]

    Not quite sure how this happened, was loading images in and they are all same size and I typed in numbers for the hotspots and I noticed ingame that one of the images was mis-aligned. I checked the images hotspots and they were all the same, so I just tested the game again and still this random frame was incorrectly aligned. So I checked again and realised the actual image of the hotspot icon in the editor is actually a pixel along EVEN THOUGH the Hotspots X position is the same! I bet you a fiver that it's something to do with float numbers and it's getting rounded.

    Thank you for your time!

    Edit: I should also note that this has happened to me twice before with different sized images. I notice that the numbers are correct but the character is a pixel out of place... iirc just moving the hotspot fixes it's alignment I think.

  • Your .capx only has one animation frame; I tried duplicating that frame, but the origin displayed correctly and the same on both frames. Can you provide a .capx that reproduces this issue?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Oh woops. I wasn't very specific with the instructions :O

    I've tidied the .capx up a bit. I had the two seperate animations inside a folder, I should have pointed out that each frame is actually in a different animation each, but now it should be more apparent when looking in the .capx.

    I also quickly added events to show that it actually affects the objects hotspot ingame (Running the capx will show it going between each animation and you can notice it shifts a pixel sideways) And still, the hotspot values are both 25 even though the image of the hotspot icon shows otherwise ;o

    dl.dropbox.com/u/7765312/Hotspotglitch/Hotspotglitch.capx

  • Should be fixed in the next build. The second image really has its origin at an X position something like 25.99998. The problem was just that the origin was drawn at a position rounded to nearest, but the controls at the top would display it rounded down. So it was only a visual error with what the position controls at the top displayed.

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