Hello Guest

Author Topic: Drawing elements from other layers  (Read 4224 times)

pnikosis

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 2
    • View Profile
Drawing elements from other layers
« on: January 21, 2014, 06:50:14 pm »
Sorry if this is a dumb question, I've searched in the forum without luck (probably because the layer term is used in different contexts).

Anyway... I have some objects that I need them to ignore collisions between them, so I created a layer (called Enemy), assigned the objects to that layer, and in the Physics2D settings, configured to ignore collisions between the elements belonging to the Enemy layer.

But now the tk2dcamera is not drawing the elements in the Enemy layer. Is there something I should do when adding and assigning layers to sprites?

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Drawing elements from other layers
« Reply #1 on: January 21, 2014, 10:29:41 pm »
No, but its likely that the camera is not drawing that layer - you can check what layers a tk2dCamera draws in the Camera tab > Culling Mask. Make sure your Enemy layer is enabled in there.

pnikosis

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Drawing elements from other layers
« Reply #2 on: January 22, 2014, 08:41:51 am »
Agh, it was the culling mask. Now I feel a little stupid, thanks! (for the help of course, not for making me feel stupid, that was my fault).