Jump to content

Search the Community

Showing results for tags 'revolutejoint'.

  • 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. Hi all. I want to create a game like Knife Hit https://www.crazygames.com/game/knife-hit I create a circle at center, some items around it and move follow the circle. I use Box2d physic for them. let angel = pos * 360 / total; // i have 18 position around center circle if (angel == 360) { angel = 0; } let posX = Math.sin(angel * (Math.PI /180)) * IG.ITEM_COIN_RADIAN; let posY = Math.cos(angel * (Math.PI /180)) * IG.ITEM_COIN_RADIAN; item.revo = this.game.physics.box2d.revoluteJoint(circle, item, 0, 0, posX, posY, 0, 5e4, true, 0, 0, true); Then when the knife hit the circle, i also make it move follow the circle if (hit) { knife.revo = this.game.physics.box2d.revoluteJoint(circle, knife, 0, 0, 0, -(this.game.height * 190 / 1280), 0, 5e4, true); } I set same motor speed. But the knife rotate faster items and it hits all items while the circle are rotating? Position of the knife as also changes as well from it hits the circle I want to keep knife and items have fixed position on circle and move with same direction and speed with circle. Please help me Thanks so much
×
×
  • Create New...