[ODE] dGeomRaySet doesn't work correctly?
Jon Watte (ODE)
hplus-ode at mindcontrol.org
Fri Sep 15 11:37:30 MST 2006
What do you set the ray length to, after you set the vector? You have to
set the length to something far enough to reach the primitive you're
trying to test for.
Cheers,
/ h+
michael kapelko wrote:
> I get position of target body, get position of a camera. Then I create
> vector = body_pos - cam_pos. Then I normalize it (make it of unit
> length). Then I do dGeomRaySet (gun_ray, cam_pos.X, cam_pos.Y,
> cam_pos.Z, vector.X, vector.Y, vector.Z) and get no ray-box collision!
> How's that possible? When I do only dGeomRaySet (gun_ray, cam_pos.X,
> cam_pos.Y, cam_pos.Z, 0, -1, 0), that is, make the ray come from camera
> to the ground, collision occurs when I move above boxes! But it doesn't
> work for arbitrary ray direction I'm trying to set. What am I doing
> wrong? Can someone show me the code with aligning a ray along camera
> view vector?
> Thanks.
> _______________________________________________
> ODE mailing list
> ODE at q12.org
> http://q12.org/mailman/listinfo/ode
>
>
>
More information about the ODE
mailing list