Jump to content

Search the Community

Showing results for tags 'relative position'.

  • 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, I would like to create a interactive zone which is relative to an existing sprite. For example, this code is working: var marcoObjs = this.add.sprite(x, y, 'marcoObjs'); var puerta1 = this.add.zone(50, 50, 100, 100) puerta1.setInteractive(); this.add.graphics().lineStyle(2, 0xff0000).strokeRectShape(puerta1); But i want the puerta1 object to be relative positioned to marcoObjs object. So if marcoObjs x,y coordinates change, puerta1 coordinates must change too. I tried this way, but is not working: var marcoObjs = this.add.sprite(x, y, 'marcoObjs'); var puerta1 = marcoObjs.add.zone(50, 50, 100, 100) puerta1.setInteractive(); this.add.graphics().lineStyle(2, 0xff0000).strokeRectShape(puerta1); Any Ideas? Thank you in advance.
×
×
  • Create New...