I think that you broke the Overlay Class Again

Started by AGP, December 20, 2015, 08:57:19 PM

Previous topic - Next topic

AGP

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:


EgonOlsen

#1
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?

AGP

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?

EgonOlsen

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?

EgonOlsen

And BTW...that plane!? Can you please post the result of getTransformedCenter() for it?

AGP

You seem angry at the plane... Sorry I took this long: 2.4624763,-21.210981,-41.660496

EgonOlsen

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.