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 ... 106 107 [108] 109 110 ... 116
1606
Support / Why not add a math class?
« on: September 06, 2008, 05:33:30 am »
And include methods like static float calculateAngle(SimpleVector origin, SimpleVector p1, SimpleVector p2)? Until then, if somebody would tell me the code for that I'd be grateful! : -)

1607
Support / Re: Distance between SimpleVectors
« on: September 06, 2008, 05:30:21 am »
While you're at it, why not a calculateAngle(SimpleVector origin, SimpleVector p1, SimpleVector p2)?

1608
Support / Re: Character Moves Towards Mouse Click
« on: August 28, 2008, 10:14:11 pm »
OK, that'll take me a little while. It's a little humbling discussing this with you, dude!

Here's a question: why does the cube translate to the camera's position? And then, why does the camera see something whose center is the same as its?

1609
Support / Re: Character Moves Towards Mouse Click
« on: August 28, 2008, 09:58:10 pm »
Thanks for the solution, my friend. But I don't understand why it is that the collision-detection line makes it work. If I take it out for the plane, it doesn't work on the plane. But if the other objects are still calculating the collision, it works on them. Why is that?

1610
Support / Re: Character Moves Towards Mouse Click
« on: August 28, 2008, 12:56:00 am »
Cool. I await your solution, pal. Thanks.

1611
Support / Re: Character Moves Towards Mouse Click
« on: August 26, 2008, 11:05:06 pm »
I sent you an e-mail with a screenshot. If we find a solution, I will post it on this thread.

As for the picking plane, I expect you mean for me to add destination.z = destination.y; destination.y = 0; again. But if that's not it, please explain. And should I pass any value for z on reproject2D3D() call?

1612
Support / Re: Character Moves Towards Mouse Click
« on: August 26, 2008, 10:30:17 pm »
I guess I misunderstood the documentation, because it says it will assume z to be 1. And the hero should move on the x and z planes. So I figured the z value would instead be placed on the y coordinate (some orientation problem someone with more spacial perception than I would understand!). But you're right, of course, about the delta. It should be calculated on the call to transform (between destination and hero.getTransformedCenter()). The following still doesn't work:
Code: [Select]
SimpleVector heroCenter3D = hero.getTransformedCenter();
SimpleVector destination = Interact2D.reproject2D3D(theCamera, buffer, mousePoint.x, mousePoint.y);
hero.translate(destination.x-heroCenter3D.x, destination.y-heroCenter3D.y, destination.z-heroCenter3D.z);

Note that the hero shouldn't even move in the y axis anyway, but I suppose I would just change the y and z values later (after I at least saw the hero appearing to be in the right place).

1613
Support / Re: Character Moves Towards Mouse Click
« on: August 26, 2008, 09:47:25 pm »
Hah, as opposed to my other overly simple questions? : -)

What's not working is that the translation value is wrong (hero goes somewhere else).

1614
Support / Character Moves Towards Mouse Click
« on: August 26, 2008, 09:17:15 pm »
I'm trying to make an RPG with 2D backgrounds and a 3D hero. When the player clicks on the screen, the hero has to move that way. The following's what I did (for translation, rotation is something else). Is it wrong, because it's not working?
Code: [Select]
SimpleVector heroCenter = Interact2D.project3D2D(theCamera, buffer, hero.getTransformedCenter());
SimpleVector destination = Interact2D.reproject2D3D(theCamera, buffer, mousePoint.x-(int)heroCenter.x, mousePoint.y-(int)heroCenter.y, hero.getTransformedCenter().z);
destination.z = destination.y;
destination.y = 0;
hero.translate(destination);

1615
Support / Re: What does Animation.getSequenceCount() return?
« on: August 21, 2008, 12:48:20 am »
I see. Thanks for the explanation.

1616
Support / Re: What does Animation.getSequenceCount() return?
« on: August 21, 2008, 12:14:21 am »
Got it. It was a Blender thing (I hate its interface). When I used Max's QTip, it worked like a charm and I got my now 3 animation subsequences. And if anyone who reads this wants to know, getSequenceCount() returns the number of subsequences. I can't tell of a way to find the number of frames, but I guess that's how Egon wants it: jPCT interpolates the animation frames so the entire thing is contained between indexes 0 and 1.0f. Also, there's an Object3D.animate(float, int) with which to pick the subsequences (the int of course).

Egon, if you do read this, for whatever it's worth I found it a little counter-intuitive to put so little in the Animation class and so much in Object3D. The Animation class, in my opinion, should be able to handle everything on its own.

1617
Support / What does Animation.getSequenceCount() return?
« on: August 20, 2008, 08:26:49 pm »
Does it return the number of subsequences in the animation, or does it return the number of frames? Because my MD2 file is supposed to have nearly (or exactly) 260 frames and 4 subsequences, and getSequenceCount() returns 16.0. How do I access the number of frames, and then how do I switch between subsequences? For that matter, how do I access the individual frame names?

1618
Support / Re: Skeletal API
« on: August 20, 2008, 08:14:33 pm »
I understand having a life, pal. I appreciate your willingness to solve it at all. But the sooner the better! :-)

1619
Support / Re: removing flicker from JPCT applet with AWT graphics
« on: August 20, 2008, 12:09:24 am »
Could it be that the applet can't access the font in question (that is to say, as a security feature applets aren't allowed)? Try adding the font file itself to the jar and somehow adding it to the system. I'm shooting blind here, but it might be right.

1620
Support / Re: Skeletal API
« on: August 19, 2008, 10:45:56 pm »
Mizuki's a she. I'll send the models to you if you want me to. By the way, to be clear, it's not that the call to setCurrentAnimation(int) doesn't work. It's that the model doesn't move in any but the very last animation.

Pages: 1 ... 106 107 [108] 109 110 ... 116