se7en

Members
  • Content Count

    2
  • Joined

  • Last visited

  1. se7en

    Position of rotating sprite around a point

    Thanks for the answer. The problem solved using sprite.angle and some math.sin and cos function. Thank a lot for your time.
  2. Hello everyone. I create a sprite and set its pivot to rotate it around the center. Just wonder why not its position updated, as console log wrote its x and y position always at the center, but then it is rotating and moving. create: function { let sprite=game.create.sprite(game.world.centerX, game.world.centerY,"sprite"); sprite.pivot.y=500; }; update: function { sprite.rotation+=0.1; console.log(sprite.x); console.log(sprite.y); } Is it the way I do it improper? Can anyone help me out? Thanks.