Jump to content

Search the Community

Showing results for tags 'pick sprite'.

  • 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 guys! I'm pretty new to java script and babylon. I want to use sprites that makes different result for my scene. so i tried to do coding like below //Create a manager for the Dinning's sprite animation var spriteDinning = new BABYLON.SpriteManager("icon_Dinning", "textures/dining.png", 1, 200, scene); var Dinning = new BABYLON.Sprite("Dinning", spriteDinning); Dinning.position = new BABYLON.Vector3(-10.11, 6.8, 13.2); Dinning.isPickable = true; Dinning.size = 2; var spriteSleeping = new BABYLON.SpriteManager("icon_Sleeping", "textures/beds.png", 1, 200, scene); var Sleeping = new BABYLON.Sprite("Sleeping", spriteSleeping); Sleeping.position = new BABYLON.Vector3(10.11, 6.8, 13.2); Sleeping.isPickable = true; Sleeping.size = 2; scene.onPointerDown = function (evt) { if (Dinning.hit) { Dinning.position = new BABYLON.Vector3(0,0,0); } if (Sleeping.hit) { Sleeping.position = new BABYLON.Vector3(0, 5,0); } }; But it seems not to be working How sad is this.... Anybody can help me?
×
×
  • Create New...