Multiples Primitives

Started by RhoX, August 10, 2011, 01:07:51 PM

Previous topic - Next topic

RhoX

Hey, folks!

I am with another problem with my project, similar (if not equal) to the one of this post (http://www.jpct.net/forum2/index.php/topic,1996.msg14704/topicseen.html#msg14704)

I'm creating six Primitives which are Planes. But, when I translate them they get smaller (farther from the screen), or higher (closer to the screen), or upper, or more down.. something like that. By the other topic this is kind of a "bug" in jPCT-AE. Unfortunately, I couldn't solve the problem with any idea that I´ve had. And I need those planes to build my interface.

Any suggestions?

Thanks in advance!

RhoX

EgonOlsen

I don't get the problem here...you complain that a plane actually gets translated when you translate it? That's now it should behave...what's the problem with that?

I guess you are refering to your "picking thread" in the second part of your post? If so, you can be pretty sure that this isn't a bug in the engine. I still haven't fully understood the problem with picking. A test case would be best.

RhoX

Well, I think I didn't make myself clear, sorry. Just a little explain: example, when a plane is translated like (X, 0,0), it gets smaller and upper (seems like the translation made is by (X, some value of Y, some value of Z).
Here is a sequence of images, to explain:



See that the first plane (left most) is correct. But the others, which supposed to be at the same Height and Depth, are shifted.
I've tried many things and nothing worked at all. What I want is to align them at the same horizontal axis, like if they were 3 buttons at the screen.

EgonOlsen

Your camera obviously isn't looking straight along the z-axis or otherwise, this can't happen. Either do so or translate by a multiple of Camera.getXAxis() instead.

EgonOlsen

BTW: Any reason for not blitting the buttons instead of making them real 3d objects? Do you want to animate them?

RhoX

Man! It worked with the camera looking to the z-axis! Thank you very much! I've not tried the second idea yet, but it seems that is going to work better for me.

About blitting... well, I've already seen some threads about it, but actually I couldn't understand the idea  ;D. Do you know any thread, tutorial or something like that could help me?

Thank you ver much again! :D

EgonOlsen

The idea is to "copy" a texture (or a part of it) to the screen. It's similar to a drawImage in Java2D.

RhoX

EgonOlsen, thank you very much!

I've tried the blit method and it worked perfectly! It's really a magical stuff! heheheh  ;D

Thank you again!

RhoX