Render 3d object with screen coordinates

Started by
21 comments, last by kobingo 18 years, 10 months ago
Well, now I got it to almost work, just as before. But the Z value make a difference if i do this:
Vector3 Vec1 = new Vector3(0,0,1);Vector3 Vec2 = new Vector3(1,0,1);Vector3 Vec3 = new Vector3(0,1,1);Plane P = Plane.FromPoints(Vec1, Vec2, Vec3);

or this:
Vector3 Vec1 = new Vector3(0,0,3);Vector3 Vec2 = new Vector3(1,0,3);Vector3 Vec3 = new Vector3(0,1,3);Plane P = Plane.FromPoints(Vec1, Vec2, Vec3);


I get differnet x,y,z values when calling:
Vector3 World = Plane.IntersectLine(P, NearVec, FarVec);
depending at which Z value I create my plane with.
Advertisement
Well, that does make sense. The x,y vary if the x,y screen pos is not exactly in the center. Imagine the rays going from a point like a star burst. The farther the z value the more x and y are moving towards the frustum border
(if you've got perspective on that is).

Fruny: Ftagn! Ia! Ia! std::time_put_byname! Mglui naflftagn std::codecvt eY'ha-nthlei!,char,mbstate_t>

Have to figure out a way to do it... Thanks for all your help :-)

This topic is closed to new replies.

Advertisement