Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Hey, for some reason, it's not resetting the platform at all! Here's the code, lemme know if i used it wrong.

    if (this.actor.arcadeBody2D.getTouches().top)
    {
        this.actor.arcadeBody2D.setCustomGravityY(-0.01)
        Sup.setTimeout(1000, returnPlatform)
        
    }
  function returnPlatform()
  {
    this.actor.arcadeBody2D.setCustomGravityY(0)
    this.actor.setPosition(this.pos)
    Sup.clearTimeout(0)
  }