www.jpct.net

jPCT-AE - a 3d engine for Android => Support => Topic started by: Irony on March 25, 2014, 08:37:35 pm

Title: Overlay glitching out?
Post by: Irony on March 25, 2014, 08:37:35 pm
Egon, can you make a wild guess what could be wrong if an overlay is not visible? It should be rendered on world.renderscene, right?

Debug code:
Code: [Select]

if (arrow==null) arrow = new Overlay(man.world, fb, "arrow");
arrow.setNewCoordinates(50, 50, 200, 200);
arrow.setVisibility(true);

Still, no overlay :(
Title: Re: Overlay glitching out?
Post by: EgonOlsen on March 25, 2014, 08:43:36 pm
Yes, it should. Try if http://www.jpct.net/jpct-ae/doc/com/threed/jpct/util/Overlay.html#setDepth(float) (http://www.jpct.net/jpct-ae/doc/com/threed/jpct/util/Overlay.html#setDepth(float)) can help here.
Title: Re: Overlay glitching out?
Post by: Irony on March 25, 2014, 08:48:35 pm
This helps somewhat. I see it in one scene, but not in the next.
Do I have to do anything with the overlay when I switch cameras?
Title: Re: Overlay glitching out?
Post by: EgonOlsen on March 25, 2014, 09:46:59 pm
"Switch cameras" means setting another camera instance to the same world instance that the overlay belongs to?
Title: Re: Overlay glitching out?
Post by: Irony on March 25, 2014, 10:29:40 pm
World.setcamerato (if this answers the question?)
Btw, using ES 2.0 if this is relevant.
Title: Re: Overlay glitching out?
Post by: EgonOlsen on March 25, 2014, 10:31:45 pm
Yes, that's what i meant. Which version of jPCT-AE are you using? If it's not the latest, please upgrade and try again. If it is the latest...do you have a test case for me to look at to verify this problem?
Title: Re: Overlay glitching out?
Post by: Irony on March 25, 2014, 10:46:26 pm
Probably the latest. Already late today so I'll check on it and prepare a test code tomorrow. Thank you so far and good night  :)
Title: Re: Overlay glitching out?
Post by: Irony on March 28, 2014, 09:06:55 pm
I am now disposing and recreating the overlay after scene change and together with the changed depth, it seems to work.
Title: Re: Overlay glitching out?
Post by: EgonOlsen on March 28, 2014, 11:17:30 pm
I'm still not sure, what the actual issue is...but if it works this way... ;)