www.jpct.net

jPCT - a 3d engine for Java => Support => Topic started by: AGP on December 20, 2015, 08:57:19 pm

Title: I think that you broke the Overlay Class Again
Post by: AGP on December 20, 2015, 08:57:19 pm
A while ago, I had a little trouble with the Overlay class. Whenever I spun my ship, the Overlay would struggle to keep up. In this latest version of jpct, my Overlay is on occasion getting covered by Object3Ds:

(https://dl.dropboxusercontent.com/u/93826015/del.png)
Title: Re: I think that you broke the Overlay Class Again
Post by: EgonOlsen on December 20, 2015, 09:59:17 pm
According to GIT's history, I haven't worked on this class for over a year and what I did back then was just adding the option to set an initial matrix, which can't possibly cause this.
Overlays are basically planes (i.e. Object3Ds), and as such they aren't treated any different than other objects. Transparent objects should be sorted to the back and drawn last. The sorting code itself hasn't changed for ages either. So I don't see what I should have done to break this...it works fine in my Overlay test case as well.

Are you setting a depth for the Overlay? Try something like overlay.setDepth(0) and see if that helps. Are you modifying Config.nearPlane and if so, are you creating the overlay before or after that?
Title: Re: I think that you broke the Overlay Class Again
Post by: AGP on December 21, 2015, 03:32:47 am
setDepth (0) didn't help. I'm not changing the near plane (but I do increase the far plane by a lot). Could whatever collision-precision thing you did in this latest version be causing this?
Title: Re: I think that you broke the Overlay Class Again
Post by: EgonOlsen on December 21, 2015, 08:02:57 am
No, Overlays have nothing to do with collisions. I really don't see what causes this nor how it should be related to any change that I've made. Can you provide a test case?
Title: Re: I think that you broke the Overlay Class Again
Post by: EgonOlsen on December 21, 2015, 09:12:08 pm
And BTW...that plane!? Can you please post the result of getTransformedCenter() for it?
Title: Re: I think that you broke the Overlay Class Again
Post by: AGP on December 24, 2015, 02:02:58 am
You seem angry at the plane... Sorry I took this long: 2.4624763,-21.210981,-41.660496
Title: Re: I think that you broke the Overlay Class Again
Post by: EgonOlsen on December 24, 2015, 08:02:43 am
No, I just wanted make sure that it won't be sorted into the back by accident...with that coordinates, it won't. I need some test case, I'm afraid.