> I'm not sure I understand what you're doing here - you're calling gluProject
> to fill out wx,wy,wz, and then you're immediately overwriting them with the
> call to gluUnProject?
gluproject gives me sz, a normalized distance between 0 (near) and
1(far) that then is passed to UnProject

> Also, if you're converting from screen coordinates to
> world coordinates, aren't you going to need to return wx, wy, AND wz?
True. But I do know that the plane is exactly in self.z, I do only
whant to know the x,y (like u,v texture) coords in that plane.
The method works when there is no rotation in the world, when sz is
equivalent to self.z, but fails otherwise beacuse it gives me a wz!
=self.z.
It calculates the coords in a plane thats paralel to the screen (at sz
distance), but the target is not there, (its not paralel, only
intersects sz at self.x).

I need to project (wx,wy,wz) over the target plane, but I dont know
how.
Last week my app was pure 2D, At this moment, all my targets only can
rotate over the Z axis
Even when the targets rotate on all axis, I only want to know the x,y
coords over the target image.

> and then call screenToWorld twice to get a ray:
Yes, I think thats the way: to intersect the target plane and the
line, and get the point over the plane.
Im testing this right now, Ill tell you.

> Also, if you don't want to save the various matrices, it's easy enough to
> ask GL what they are. For example:
>
> model_view_matrix=glGetDoublev(GL_MODELVIEW_MATRIX)

But I have done a recursive thingy, targets can be attached to another
target (parent relationship),
and every one has its position, rotation, scale functions over time,
all relative to its parents.
Every target has its own MODELVIEW, that is depending on all its
"family".

Yes, it can be improved, Im thinking in a kind of "selection pass", I
dont know how expensive is
to save the matrix for every target on every frame.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pyglet-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/pyglet-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to