Jump to content

Search the Community

Showing results for tags 'Body.rotation'.

  • 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
    • Paid Promotion (Buy Banner)
  • Frameworks
    • Pixi.js
    • Phaser 3
    • Phaser 2
    • Babylon.js
    • Panda 2
    • melonJS
    • Haxe JS
    • Kiwi.js
  • General
    • General Talk
    • GameMonetize
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered
    • Marketplace (Sell Apps, Websites, Games)

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 1 result

  1. Hello there! I'm making a game to learn the phaser engine (guess what! A flappy bird again !). I got 2 images of pipes. One looking up and one looking down. I realised that since the image is the same i could save a few bytes by using the same image for the sprite but rotating it. I used sprite.angle but the problem with it is that when i apply an anchor and the physics are enabled for the pipe it fly off the screen. I used body.rotation with success on the bird sprite to animate it while flying but the problem is that it works only if i do so in the update loop. So what i ask here is either tell me a good practice to use correctly sprite.angle or tell me how i can change the body.rotation outside the update() loop. Also, what are the differences of those two? Is on of them more "expensive" in resources than the other? Which should i use for that kind of work? Here you can see the code . Thank you in advance!
×
×
  • Create New...