Jorisslagter

Members
  • Content Count

    2
  • Joined

  • Last visited

  1. Nicely done, I like the game elements you put in the game. It's definitely fun to play and I think also allot of fun to create. Am I right?
  2. Yes, you are right. Anchor doesn't affect any transforms. I believe it's in it own way more a offset for drawing purposes. By looking in the Sprite.js code in de Pixi.js source I see that by setting an anchor point, the position stays untouched. These methods are simply for two different things. Setting the position, gives the sprite a placement in the scene. When you would give a sprite an anchor, you simply tell Pixi.js from what point you want the Sprite to rotate/drawn. See here. The sprite is added to a global space and forms a new zero point to the children. The children are added to the sprite. But when you change the position of the children, the position will be relative to the position of the first sprite (local). So 0,0 means, directly on top of the parent. If you don't want this behavior. I'am thinking why you want to add children to this sprite? You can just put them in an other container.