0
grav = 0; 
gravity = 2; 
this.character.y += grav;
grav += gravity;
 while (this.ground.hitTestPoint(this.character.x, this.character.y, true)) { this.character.y -=gravity; 
grav = 0; 
}
 }

I use this command for gravity and they work with camera for Flash Player 26 but "hitTestPoint" is not working properly in "air 26 for Android". When camera moves, hitTestPoint is failing and causing the character to fall.

  • The **hitTestPoint** method works with stage coordinate space. I don't know the hierarchy of the display list of yours, but I guess the coordinates go off at some point. You need to use **localToGlobal** method on coordinates before passing them to **hitTestPoint**. – Organis Aug 17 '18 at 11:43
  • I think my ask this ty but not now try – Cemre Başoğlu Aug 17 '18 at 11:56
  • flash player 32 in work but I chance air for android my character is fall :(( help – Cemre Başoğlu Apr 05 '20 at 11:31

0 Answers0