Touch area not same as physical object [partially fixed]

vikingpotato

  • Posts: 852
I have an object, autoscale collision bounds enabled. I rotated it, and the physics and visuals for the new rotated objects work well.

The problem is, the touch area is still where the object would have been, had it not been rotated:

Which means that when i rotate an object in scene editor
- the Physical body rotates
- The sprite animation rotates
- The touch/click area doesn't rotate.

Happens every-time.

Edit: When i say touch area, i mean touch & click area.

« Last Edit: December 16, 2014, 07:12:21 pm by rob1221 »

vikingpotato

  • Posts: 852
Thanks to Rob for fixing the Blackout bug, now this is the only major bug preventing me from releasing Wonder Soup.
I have added a screenshot to better explain the problem. I think the issue is pretty basic and straightforward, thanks in advance.

Dom818

  • *
  • Posts: 1292
I came across this bug when I was updating one of my apps. I ended up working around it by making a 1x1 transparent actor and spawning it at every touch. I would check if it collided with anything and if it did, I would trigger an event for that actor. If it did not collide, I would kill it.

vikingpotato

  • Posts: 852
i can't really do a workaround here, the game is done and sealed :(

rob1221

  • *
  • Posts: 9473
I found the source for the mouse detection, and as expected it doesn't account for rotation.  If someone who is good with trigonometry can make a behavior that detects the mouse over an image with rotation, I'll edit the source to include it.

Why can't you do a workaround?

vikingpotato

  • Posts: 852
i am afraid creating new actors for touch detection will create unwanted complications and again create new bugs; as is, the game has been shelved since the jam waiting for bug fixes.

Also i am not sure what kind of workaround are we talking about here, even if i create a new actor for touch detection, it wont make a difference because the rotation framework is still corrupt

rob1221

  • *
  • Posts: 9473
I was referring to Dom's workaround.  I'm pretty sure I used that in Color Ball Physics and it works fine.

rob1221

  • *
  • Posts: 9473
Somewhat fixed.  Mouse detection for actors now works with rotation and with any origin point, but it doesn't work if the actors are scaled with the grow block.

vikingpotato

  • Posts: 852
My objects have no scale change! thanks a ton!! testing it right away

vikingpotato

  • Posts: 852
Mac (Updated: 19 hours ago)
Windows (Updated: 19 hours ago)
Linux (32-bit) (Updated: 19 hours ago)
Linux (64-bit) (Updated: 19 hours ago)

Is the change committed ?

rob1221

  • *
  • Posts: 9473
Yes, why do you ask?  My previous post is 20 hours behind yours.

EDIT: Oh right, you probably didn't know I can commit changes now.

vikingpotato

  • Posts: 852
How could i know..

btw a lot has changed in the version of 3.0 i used to make my game and the current one(like it still had recycle blocks etc).. My game just freezes on mobile; i will debug and try to fix it, might take some time

vikingpotato

  • Posts: 852
Its exactly how you describe, works perfect for my game! Thanks  :)

Callan S

  • Posts: 147
It appears if you set origin to something like bottom center, then scale it down, to get a collision you have to click above the scaled down sprite (in a square that seems roughly the same size as the sprite). If you're trying to click on it with a mouse, for example, it wont register a click unless you click above the reduced sprite.

rob1221

  • *
  • Posts: 9473
Just bumping this to remind myself/others that the bug with mouse detection for scaled actors still exists.