Mogre/Bulletsharp ray picking problem

kurosuna

09-10-2011 17:16:44

White line: world center
Green line: bullet ray hit
Blue line: mogre ray hit (correct one)

I'm trying to pick bodies using bullet RayTest in a world with a floor and some cubes but the results won't go as far from the world center as they should. I made a identical test using Mogre's Ray and AxisAlignedBox that gives the correct position so I know the ray origin and direction are correct.


CollisionWorld.ClosestRayResultCallback callback = new
CollisionWorld.ClosestRayResultCallback(v1,v2);
//Console.WriteLine("raytest");
World.RayTest(v1, v2, callback);

kurosuna

09-10-2011 23:26:50

Never mind I solved it,

RayTest takes start point and destination point even though the docs say the second vector is the direction

Can anyone here change them?

http://code.google.com/p/bulletsharp/issues/detail?id=7