Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - AGP

Pages: 1 [2] 3 4 ... 104
16
Support / Re: Interact2D
« on: January 18, 2018, 09:47:20 pm »
I don't need the height in wordspace. Only the x and the z.

17
Support / Re: Interact2D
« on: January 17, 2018, 09:29:51 pm »
I have x and y in screen coordinates, so about which z are you talking? And could you show me a snippet?

18
Support / Interact2D
« on: January 16, 2018, 08:38:03 pm »
I'm trying to make a little level editor. Right now, all it will do is to allow you to position some enemies by clicking on the 3d map. I'm not very interested in the y coordinate, because they will place themselves relative to the floor's height). But the following code always places the enemiies in the same (marked) spot:
https://www.dropbox.com/s/r73iukqn0wdtcjs/LE.jpg?dl=0

Code: [Select]
     public void mouseClicked(MouseEvent e) {
Point p = e.getPoint();
SimpleVector p3d = Interact2D.reproject2D3DWS(camera, buffer, p.x, p.y);
System.out.println("p3d: "+p3d);
p3d.y = -2000f;
objects[numberOfObjects++] = Primitives.getCube(100f);
objects[numberOfObjects-1].build();
objects[numberOfObjects-1].translate(p3d);
theWorld.addObject(objects[numberOfObjects-1]);
     }

19
Support / Re: Does TextureManager Operate on a Parallel Thread?
« on: January 13, 2018, 06:41:15 am »
It did because the loader and the texture weren't in the same directory. I fixed it by getting the absolute path. Would it be possible to add a line identifying the fact that the problem is coming from trying to load the texture, rather than when loading the model?

20
Support / Re: Does TextureManager Operate on a Parallel Thread?
« on: January 12, 2018, 06:17:19 pm »
It's not the model loader that's failing, it's the TextureManager. Any chance you could improve the error message here, to indicate that it's the TextureManager that's failing to add the texture?

21
Support / Re: Does TextureManager Operate on a Parallel Thread?
« on: January 12, 2018, 05:57:40 pm »
I have loadModels() method whose first line is loadTextures(). But the loader fails at finding the texture even before loadTextures prints its name. What gives?

22
Support / Does TextureManager Operate on a Parallel Thread?
« on: January 12, 2018, 05:45:37 pm »
If so, how do I wait for it? My app is failing to find a texture after it's been added to the TextureManager.

23
Support / Re: rotateMesh Bug
« on: January 12, 2018, 03:45:29 am »
What about some logic to hide the fact that the matrix has not been cleared? Is that too convoluted? Even just a better message when throwing the exception would help. But in this particular example, you select your ship from inside a hangar. The whole thing is already short of 400k triangles, so I need all the optimization I can get inside the hangar. The game itself, naturally, has a different orientation to the hangar (since the ships have to be positioned aesthetically relative to the player). Thus my little hack.

24
Support / Re: rotateMesh Bug
« on: January 11, 2018, 04:30:28 pm »
Still... I made a hack, just compiling (then decompiling before rotation) for that one specific ship. Wouldn't it be better to just make rotateMesh() work in some form or another, though?

25
Support / Re: rotateMesh Bug
« on: January 10, 2018, 06:12:16 pm »
But then it's going to cost me performance, right?

26
Support / Re: rotateMesh Bug
« on: January 10, 2018, 04:20:12 pm »
So is there no way for me to rotate and clear the object's matrix at that point?

27
Support / rotateMesh Bug
« on: January 10, 2018, 03:16:28 pm »
The following code doesn't crash with Object3D.rotateY(...) but crashes with a NullPointerException on Object3D.rotateMesh().

Code: [Select]
if (ship instanceof Blah) {
     ship.body.rotateY((float)Math.PI*.5f);
     ship.body.rotateMesh();
     ship.body.clearRotation();
}

28
Support / Re: Too Bright With Software Renderer
« on: December 20, 2017, 07:37:09 pm »
Thank you. You should make that more explicit in the docs, or otherwise just hide the Lights class and move that setting to World. I had looked for it everywhere last night. Thought maybe the method had been removed.

29
Support / Too Bright With Software Renderer
« on: December 20, 2017, 06:52:49 am »
I even wrote the following (where "amount" refers to color intensity for all three colors):

Code: [Select]
int amount = 15;
float attenuation = 3.6f, dist = 1f;
theWorld.setAmbientLight(25, 25, 25);//-20
if (b.usesRenderer(IRenderer.RENDERER_OPENGL)) {
theWorld.setAmbientLight(125, 125, 125);//-20
     amount = 55;
     attenuation = 3600f;
     dist = 10f;
}
else Config.lightMul = 1;

30
Support / Re: Loader.loadOBJ Problem
« on: November 28, 2017, 05:06:22 pm »
As soon as you posted this, I re-exported for the hundredth time and, for reasons passing understanding, it worked. Just to let you know.

Pages: 1 [2] 3 4 ... 104