Jump to content

Sprites rollover


Floof
 Share

Recommended Posts

hi everyone

I 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 ?

 

 

post-10669-0-80677800-1411055904.jpg

post-10669-0-06261300-1411055914.jpg

 

 

 

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...