Jump to content

Search the Community

Showing results for tags 'unanswered question'.

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

  1. Assuming 2 sprites in a scene, how does one draw a line from one to the other? Here's my attempt, starting from one of the examples in the sandbox: function create (data) { const sprite1 = this.add.sprite(100, 100, 'mech'); const sprite2 = this.add.sprite(400, 400, 'mech'); sprite1.setInteractive(); sprite1.on( 'pointerdown', () => this.add.line( 0, 0, sprite1.x, sprite1.y, sprite2.x, sprite2.y, 0xff0000 ) ); } result after clicking: Slope and magnitude looks right, but the starting and ending points appear wrong. Can anyone see what I'm doing wrong? src_scenes_boot data.js
×
×
  • Create New...