Author Topic: I think that you broke the Overlay Class Again  (Read 2410 times)

Offline AGP

  • quad
  • ******
  • Posts: 1726
    • View Profile
I think that you broke the Overlay Class Again
« 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:


Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: I think that you broke the Overlay Class Again
« Reply #1 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?
« Last Edit: December 21, 2015, 04:21:22 pm by EgonOlsen »

Offline AGP

  • quad
  • ******
  • Posts: 1726
    • View Profile
Re: I think that you broke the Overlay Class Again
« Reply #2 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?

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: I think that you broke the Overlay Class Again
« Reply #3 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?

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: I think that you broke the Overlay Class Again
« Reply #4 on: December 21, 2015, 09:12:08 pm »
And BTW...that plane!? Can you please post the result of getTransformedCenter() for it?

Offline AGP

  • quad
  • ******
  • Posts: 1726
    • View Profile
Re: I think that you broke the Overlay Class Again
« Reply #5 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

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: I think that you broke the Overlay Class Again
« Reply #6 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.