Debug drawing aspect ratio, multi touches in wrong orientation [b44]

JensWinterstein

  • *
  • Posts: 433
I tried to expand the touchable region of an actor and found the following after enabling debug drawing (landescape mode, 480x320):



It seems everything is rotated by 90° and I think this is closely related to: http://community.stencyl.com/index.php/topic,3562.0.html
(and maybe already fixed in b42?  8) )

Multitouch points also seem to function only within the wrong aspect ratio.

« Last Edit: September 24, 2011, 10:19:29 am by Jon »
Get 100 Chambers for Android / iOS
Get Cubus Velox for Android / iOS or play it on Flash

- Portfolio

Jon

  • *
  • Posts: 17529
Yeah, I know about this one and haven't fixed it yet.

JensWinterstein

  • *
  • Posts: 433
Thanks :)
I can confirm that all Multitouch points/events stick to the debug drawing ratio.
i.e.: When you press the upper red debug box, the green guy will jump.

I'm checking the hitbox manually to increase the actor's touch-/clickradius by doing this:
Code: [Select]

for (SPTouch* touchPoint in [Game game].startTouches)
  {
    if (((((touchPoint.globalX < ([mActor getX] + 64)) && (touchPoint.globalX > ([mActor getX] - 32))) && ((touchPoint.globalY < ([mActor getY] + 64)) && (touchPoint.globalY > ([mActor getY] - 32)))) && ([self sameAs:[NSNumber numberWithBool:_inAir] two:[NSNumber numberWithBool:FALSE]] && !([[self getGameAttribute:@"globalGoal"] boolValue]))))
{
 doStuff
}
}

Otherwise the game is nearly unplayable due to a too small hitradius (32x32).
I hope this information helps in hunting down the issue. :)

Ideas for another way of doing this are also welcome.
Get 100 Chambers for Android / iOS
Get Cubus Velox for Android / iOS or play it on Flash

- Portfolio

Jon

  • *
  • Posts: 17529
You are right to say that the multi-touch points appear to be untranslated to landscape orientation. I'll see what I can do.

Jon

  • *
  • Posts: 17529

JensWinterstein

  • *
  • Posts: 433
Frickin' awesome!
Can't wait to get the game out now :)
Get 100 Chambers for Android / iOS
Get Cubus Velox for Android / iOS or play it on Flash

- Portfolio

Jon

  • *
  • Posts: 17529
The multi-touch change broke the joystick and actor touch detection.I'm going to have to pull this change for now or reimpl.

JensWinterstein

  • *
  • Posts: 433
I just tried out [b43] and can confirm that the multi-touch points and debug drawing are now correctly translated to the game's orientation.
About the broken actor touch-detection: It seems that this isn't really broken but instead using a different orientation now / being untranslated to the orientation. i.e.:



In case I click/touch the area of the black shape, the big grinning box responds and moves.
Get 100 Chambers for Android / iOS
Get Cubus Velox for Android / iOS or play it on Flash

- Portfolio

Jon

  • *
  • Posts: 17529
What happened is that it's double-translating, so it's back to portrait (or something like that). I'm going to redo how I implemented this.

Jon

  • *
  • Posts: 17529