Hello Guest

Author Topic: Entity in front of others  (Read 1577 times)

0 Members and 1 Guest are viewing this topic.

Luuk

  • Member
  • Posts: 4
    • View Profile
    • Twitter
Entity in front of others
« on: March 05, 2015, 09:32:43 PM »
How to ensure that an entity stay in front of others graphics in a scene?

I just add this entity after all to the scene, but when I use a ogmo map with 2 layers of tiles (collidable tiles and background tiles), my entity (that is my HUD) stay behind of collidable tiles layer
I can't figure why

Kyle

  • Administrator
  • Member
  • Posts: 259
    • View Profile
Re: Entity in front of others
« Reply #1 on: March 09, 2015, 12:57:00 PM »
You can use the Layer property of an entity to set its depth.  Negative numbers are closer to the camera, positive is further away (think of Layer as a distance from the camera.)  So if you set your HUD entity like this: Layer = -10000;  It will probably show up on top of everything else.