Jump to content

Search the Community

Showing results for tags 'flippers'.

  • 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, I'm newbie in Phaser (excuse my english)... Currently I'm developing pinball game. I have created flippers (paddle) via revolute constraints and ball in P2 physics... Everything works perfect but I need to make flippers more powerfull when they hit to ball (I need ball acceleration)... currently CreatePaddle = function(game,x,y, side) { Phaser.Group.call(this, game); this.side = side; this.flipped = false; this.sprite_two = game.add.sprite(x, y, 'paddle'); game.physics.p2.enable(this.sprite_two, true); //this.sprite_two.body.clearShapes(); if(side == 'right') { this.sprite_two.body.loadPolygon('physicsData', 'paddle2'); this.maxAngle = 30; this.pivotOffsetX = 50; this.sprite_two.scale.x *= -1; this.pivotPoint = this.game.add.sprite(this.sprite_two.position.x + this.pivotOffsetX, this.sprite_two.position.y); this.pivotOffsetX = 50; } else { this.sprite_two.body.loadPolygon('physicsData', 'paddle'); this.maxAngle = -30; this.pivotOffsetX = -50; this.pivotPoint = this.game.add.sprite(this.sprite_two.position.x + this.pivotOffsetX, this.sprite_two.position.y); } this.game.physics.p2.enable(this.pivotPoint); this.pivotPoint.body.static = true; this.pivotPoint.body.clearCollision(true,true); this.flipperConstraint = this.game.physics.p2.createRevoluteConstraint(this.sprite_two, [this.pivotOffsetX, 0], this.pivotPoint, [0, 5]); this.flipperConstraint.upperLimitEnabled = true; this.flipperConstraint.lowerLimitEnabled = true; return this.flipperConstraint;}Ball is created like this: //ball - circlecircle = game.add.sprite(470, 300, 'circle');circle.anchor.setTo(0.5, 0.5);game.physics.p2.enable(circle, false);circle.body.setCircle(16);circle.body.fixedRotation = true;Flippers are loaded like this: this.paddle1 = new CreatePaddle(game, 270, 2390, 'left');this.paddle2 = new CreatePaddle(game, 460, 2390, 'right');But how can I add more power to ball which collide with my flipper (paddle) ? Should I create custom material for flipper or is there easier way? Thanks for answers.
×
×
  • Create New...