Fixed plane renderer not accounting for scaling on the z axes

This commit is contained in:
Sollace 2018-08-17 18:09:46 +02:00
parent 0ca03dbfa6
commit da26aef533

View file

@ -60,10 +60,10 @@ public class PlaneRenderer extends AbstractPonyRenderer<PlaneRenderer> {
} }
public PlaneRenderer addFrontPlane(float offX, float offY, float offZ, int width, int height, float scale) { public PlaneRenderer addFrontPlane(float offX, float offY, float offZ, int width, int height, float scale) {
return addPlane(offX, offY, offZ, width, height, 0, scale, Face.NORTH); return addPlane(offX, offY, offZ - scale * 2, width, height, 0, scale, Face.NORTH);
} }
public PlaneRenderer addBackPlane(float offX, float offY, float offZ, int width, int height, float scale) { public PlaneRenderer addBackPlane(float offX, float offY, float offZ, int width, int height, float scale) {
return addPlane(offX, offY, offZ, width, height, 0, scale, Face.SOUTH); return addPlane(offX, offY, offZ + scale * 2, width, height, 0, scale, Face.SOUTH);
} }
} }