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 ... 100 101 [102] 103 104 ... 116
1516
Support / Re: A Little Trigonometry
« on: May 30, 2009, 09:22:48 pm »
And Egon, yours also doesn't work. Both are turning the car in odd directions, and I think it might be because my +Z is up. Sorry for the mathematical ignorance, but you forget so much after ten years without looking at this stuff much. Now, I'm thinking I'll brush up later. :-)

But here's a question: which method should be faster (yours or paulscode's), even if trivially? Are their results equally reliable?

1517
Support / Re: A Little Trigonometry
« on: May 30, 2009, 09:18:36 pm »
I'm rotating around the Z axis (+Z is up, the car moves on the X/Y plane). I'm not sure what your rotationAxis is suppose to do or for that matter where to plug it.

1518
Support / Re: A Little Trigonometry
« on: May 30, 2009, 08:45:11 pm »
They're world coordinates. Pointer is taken from the center of the car's child (which is a lot like that target I made for my ship to follow in that other game, if you remember). Direction is a world coordinate that the car has to chase (it's pretty much on rails--I'll come up with a pathfinding algorithm later). So I did this, but the car still doesn't rotate right. Do you have any idea why? And thanks in advance, pal.
Code: [Select]
SimpleVector a = direction.calcSub(center).normalize();
SimpleVector b = opponentPointer.getTransformedCenter().calcSub(center).normalize();
float lengthC = b.calcSub( a ).length();
float theta = (float) Math.acos( (2.0f - (lengthC * lengthC) ) / 2.0f );

1519
Support / Re: A Little Trigonometry
« on: May 30, 2009, 07:40:07 pm »
I don't think I got this right:
Code: [Select]
SimpleVector center = opponentCar.getTransformedCenter();
SimpleVector a =  new SimpleVector(center);
a.add(direction);
SimpleVector b = new SimpleVector(center);
b.add(opponentPointer.getTransformedCenter());
float cosine = a.calcDot(b)/(Math.abs(a.x*a.y)*Math.abs(b.x*b.y));
float arcCosine = (float)Math.acos(cosine);

1520
Support / A Little Trigonometry
« on: May 30, 2009, 06:32:34 pm »
I need to find the theta of the following triangle. The only trigonometry book I kept from school doesn't answer this very well. Can anyone help?


1521
Support / Re: Texture.setAlpha(int)
« on: May 29, 2009, 08:29:26 pm »
OK, good, so that answers it. I'm not sure how I can change this object, which is REALLY complex, but I'll try later and at least I know why it wasn't working. Thanks a lot.

1522
Support / Re: Texture.setAlpha(int)
« on: May 29, 2009, 07:06:46 pm »
Yeah, I did almost exactly the same thing you did, except that my model is far bigger, and each segment of it is made up of many parts, each of which with different textures. Plus, I loaded my textures before the model (as per jPCT norm) and I never called model.setTexture(Texture). Other than that, I did the same thing, so that leads me to believe that it's the multi-texture thing. Egon?

1523
Support / Re: Texture.setAlpha(int)
« on: May 29, 2009, 04:16:11 am »
It's a single 3ds file with multiple parts to it, but are merged into one via Object3D.mergeObjects(Object3D,Object3D). Let me have a look at your code and get right back to you. And thanks again.

1524
Support / Re: Texture.setAlpha(int)
« on: May 29, 2009, 12:24:13 am »
Thanks for your suggestions, although none of them worked and my images have no background. I even tried the black thing, and setting useAlpha to false. It is supposed to work on the software OpenGL, right? And another question: the docs for setAdditionalColor(java.awt.Color) say it's possible for you to set a color above 255, 255, 255 for lightsources and such, except that the JRE throws an IllegalArgumentException when your values are brighter than white. So what gives?

EDIT: I should specify that this object has a million textures, not just the one. Does that matter?

1525
Support / Re: Texture.setAlpha(int)
« on: May 28, 2009, 07:51:15 pm »
I'll post two screenshots later today of what I'm writing about, but right now suffice to write that the alpha areas in my png texture are showing up as white. Is it possible to make them invisible?

1526
Support / Re: Texture.setAlpha(int)
« on: May 28, 2009, 08:10:16 am »
I'm confused. I want to tell the renderer the color blue should be invisible. Is that doable? And I tried Color.blue.getAlpha() as well to the same result, but I guess you just explained that its alpha would be opaque. But isn't the purpose of the setAlpha(int) method to make a given area transparent?

1527
Support / Texture.setAlpha(int)
« on: May 28, 2009, 04:07:29 am »
I thought when I saw this method in the documentation that I would be able to select a texture then say texture.setAlpha(Color.blue.getRGB()), and that would make every blue area completely transparent. Since there's nothing in the docs to explain what it's supposed to do, what exactly is it supposed to do? And more importantly to me, how do I achieve the same result as the one I expected? Thanks in advance.

1528
News / Re: Version 1.18 has been released!
« on: May 27, 2009, 11:25:27 pm »
As usual, thanks a whole lot, Egon. I appreciate all your work, and your engine really rocks.

1529
Support / Re: World.setAllVisible(boolean)
« on: April 28, 2009, 06:42:59 pm »
Thanks a whole lot, pal.

1530
Support / World.setAllVisible(boolean)
« on: April 28, 2009, 01:17:06 am »
Not to rush you in any way, Egon, but I was wondering if you already have a beta of 1.18 with that in so that I don't have to do it differently on my code and have to change it later.

Pages: 1 ... 100 101 [102] 103 104 ... 116