Jump to content

Search the Community

Showing results for tags 'sprite size'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • HTML5 Game Coding
    • News
    • Game Showcase
    • Facebook Instant Games
    • Web Gaming Standards
    • Coding and Game Design
  • Frameworks
    • Phaser 3
    • Phaser 2
    • Pixi.js
    • Babylon.js
    • Panda 2
    • melonJS
  • General
    • General Talk
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Twitter


Skype


Location


Interests

Found 3 results

  1. Hi all. I try to get width/height properties in pixels with object PIXI.extras.AnimatedSprite but all time it return 1. How i can do that? In the object this properties is true console.log
  2. If I do this: function paddleUpdate() { if(isPaddleNerfed) { paddle.frameName = "paddle_small.png"; //48px width } else { paddle.frameName = "paddle_big.png"; //32px width } //Do I have to set the size manually like this paddle.body.setSize(paddle._cache.width, paddle._cache.height); } I ask because with: game.debug.renderSpriteBounds(paddle); I see the pink border and it's changing size (but only visually): collisions and also sprite.body.width still returns the old bigger size rather than the smaller/nerfed one... Also visually it's
  3. Well the topic title says all I was lazy enought to want to not use: sprite.width / 2; //works as expected so i tried: sprite.halfWidth; //undefined so checked the phaser source and saw i have to use: sprite._cache.halfWidth //works as expected ... but doen't feel ok _cache... Also there is this: sprite.body.halfWidth //works as excepted but i'm not 100% sure that this isn't the physics body width and not the sprite width So a little info to clear this topic will be cool ?
×
×
  • Create New...