How to make children actors be drawn before parent?

How to make children actors be drawn before parent?

Postby Dexxit » Sun Oct 22, 2017 1:39 pm

Hello, I have a problem with drawing order, is it possible to let children actors be drawn before parent actor they are attached to? I found SetPriority function but it only works for children actors.
Dexxit
 
Posts: 6
Joined: Mon Oct 16, 2017 8:27 pm

Re: How to make children actors be drawn before parent?

Postby admin » Sun Oct 22, 2017 6:51 pm

no solition out of box.
1. change Actors hierarchy
2. or create own Actor and override Actor::render
User avatar
admin
Site Admin
 
Posts: 755
Joined: Mon Oct 21, 2013 6:47 pm

Re: How to make children actors be drawn before parent?

Postby Dexxit » Wed Oct 25, 2017 6:51 pm

Oh, ok, I ended up with derived Actor class that contains all Actors and draws it in specific order. It would be better to create some methods in actor such beforeParent(true) or something like that. Anyway, thanks for the tips, I made it somehow :)
Dexxit
 
Posts: 6
Joined: Mon Oct 16, 2017 8:27 pm


Return to oxygine-framework

Who is online

Users browsing this forum: pixel and 1 guest

cron