Floof Posted September 18, 2014 Share Posted September 18, 2014 hi everyoneI am actually working on my first video game using Babylon.js. This engine is so cool ! But I have a little problem with a sprite.. http://www.peru-lab.com/quetzal/level1# In this level there is a blue star in the cosmos, and I would like to reveal informations about this star just using a rollover with the mouse I already created a sprite for the star and another sprite for the informations but I don't know how to reveal it with a simple rollover here is the code i use for the two sprites : var spriteManagerPlayer = new BABYLON.SpriteManager("playerManagr","center_galaxy.png", 2, 320, scene);var player = new BABYLON.Sprite("player", spriteManagerPlayer);player.position.y = -100;player.size = 2; var spriteManagerPlayer = new BABYLON.SpriteManager("playerManagr","hud_1.png", 2,60, scene);var player = new BABYLON.Sprite("player", spriteManagerPlayer);player.position.y = -99;player.size = 1; then, I didn't find any information in the documentation about sprites' rollover animations/actions Could you help me please ? Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted September 18, 2014 Share Posted September 18, 2014 Instead of sprites, you should use regular plane with plane.billboardMode = BABYLON.AbstractMesh.BILLBOARDMODE_ALL Then you can use the technique presented here : http://www.babylonjs.com/playground/#1T3YVZ I really love your demo btw! Quote Link to comment Share on other sites More sharing options...
Floof Posted September 19, 2014 Author Share Posted September 19, 2014 Thank you very much using the billboard mode works pretty well ! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.