Touch range is incorrect when rotated AND width/height has been changed

Use this template to make awesome bug reports:

Your username:
NTh3R

What kind of device are you using?:
iPad 6th gen

1 sentence description of the problem (I was doing _________, and then __________ happened):
I noticed that the hitbox of an object with a different angle than 0 doesn’t rotate with it
In other words, “when self is tapped” works with this red zone:
image

Steps that the Hopscotch team can take to reproduce my problem every time:

  1. Make sure your device is ready to eat a link
  2. Click on this text
  3. Ask your device if he’s okay
  4. atchoum.

come on be serious please

Go into this link and click on the extreme left or extreme right of the object. You should have no sound. Then click on the white space just after the object. It has a sound. It’s because the hitbox for the object didn’t rotate.

I expected this to happen:
Works well
But instead this happened:
Guess what happened, i already explained lol


@Rectangle @Awesome_E

16 Likes

Here’s the issue lol

6 Likes

wut how lol

6 Likes

Have you tried this on your device? Can anyone else report what happened when they click on the project link? (i.e. “iPad Air 4, bug occurs”)

For me, the hitbox seems to be a plus shape. Maybe something is just mapped wrong in the player, but that’s still a bug nonetheless. (M1 Air, Chrome @ latest)

12 Likes

Bug occurred (weird when self is pressed bug on rotated objects) on iPad Pro 11” 2018

6 Likes

the link doesn’t work for me—it just goes to the main page of hopscotch

5 Likes

(another bug with the latest update; unpublished projects dont link correctly at all)

5 Likes

For the bug I found with touching transformed objects, using another Set Image block was a work-around. See this last post on that topic. I’m curious if that works for you; I can’t open your link.

4 Likes

oops
i’ve unpublished it because it’s not a game
sorry no one D:

2 Likes

That may be intentional or as a result of the new metadata endpoint, but I’m not sure. If you think about it though, that’s how it should have worked before, but it can be really incovenient

5 Likes

that’s funny

2 Likes

I came across the same bug (or at least a similar) when changing the width and height of an object then rotating it.

The oval should change colors when self is tapped. However, you will notice that, at time, you will tap it and nothing will happen while at other times it will change colors when you tap outside.

Anywhere inside the black oval is where you can tap, but as you can see, most of that’s not the actual object.

This is a solution, but set image defaults the color of the object back to black, which can be inconvenient.

6 Likes

In summary, it seems:

  • Touch range works incorrectly when an object is rotated AND its width/height has been changed
  • Touch range works correctly if an object is rotated but its Width/Height has not been changed
  • Touch range works correctly if an object’s Width/Height has been changed but it has not been rotated

Yeah it seems like it’s the same bug. When I remove the Set Angle block, the touch range works correctly.

If I rotate without changing Width/Height, the touch range also works correctly here

Here’s the code for the project in the original post (I can confirm that the touch range doesn’t work correctly too):

3 Likes