Pyro LayerObject Z value/Rendering order

About Monkey 2 Forums Monkey 2 Programming Help Pyro LayerObject Z value/Rendering order

This topic contains 3 replies, has 3 voices, and was last updated by  abakobo 1 year, 3 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #12886

    abakobo
    Participant

    I’d like to define the rendering order of Pyro’s LayerObjects.

    Modifying Z is not changing the rendering order..
    What’s LayerObject.Z for?

    How can I define LayerObjects rendering order?

    For now last added LayerObject draws in front is all I can control.

    EDIT: I’m now using layers but still wonder what the .Z value is for and if there is anther way (than layers) to set render order.

    #12897

    Abe _King_
    Participant

    Unfortunately, this is something missing from the Pyro2 Bananas that is pretty helpful in a lot of cases. All you gotta do is create a sorter class and then set a layer’s Sorter to it!

    For Example, the class and the layer setting

    A while back I wondered the same thing and looked to see if there was a way to Sort elements in a Pyro layer – I found a slightly indirect answer finding out that something like this existed in the first Pyro engine and checked and saw that Pyro 2 layers also had sorting functionality!

    Disclaimer: I never tested this code lol

    #12919

    Playniax
    Participant

    You are correct. It does have a sorter. I can create an example if the above did not do it for you!

    #13009

    abakobo
    Participant

    Great thanks worked almost perfectly. Had to add just a “:Int” after “Lambda”

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.