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 ... 103
1
Support / Re: Interact2D
« on: Today at 06:26:31 am »
I went with the mouse-follow demo and ray-cast. It's working but, academically, I'd still like to know how to make use of the method which takes the camera z value.

2
Support / Re: Interact2D
« on: January 19, 2018, 06:52:08 pm »
So how do I get the plane's z in cameraspace?

3
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.

4
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?

5
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]);
     }

6
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?

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

8
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?

9
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.

10
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.

11
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?

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

13
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?

14
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();
}

15
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.

Pages: [1] 2 3 ... 103