Hello guys , i need to apply differents actions to differents Sprites , but in the documentation there is no informations to control each Sprites , i use this code :
var spriteManagerPlayer = new BABYLON.SpriteManager(“playerManager”, “1.png”, 2, {width: 250,height: 250}, scene);
var player = new BABYLON.Sprite(“player”, spriteManagerPlayer);
var spriteManagerPlayer1 = new BABYLON.SpriteManager(“playerManager1”, “2.png”, 2, {width: 250,height: 250}, scene);
var player1 = new BABYLON.Sprite(“playe1r”, spriteManagerPlayer1);
scene.onPointerDown = function (evt) {
var pickResult = scene.pickSprite(this.pointerX, this.pointerY);
if (pickResult.hit) { player1.size = 0; }
};
we can see that scene.onPointerDown is affecting player1 and player2 , i want to have different action when i click player1, and another action when i click player2
thanks man that what i need (y) , just a simple question how you know that ? i mean i checked the whole documentation and i dont found .onPick function ??