newton raycast hits on room mesh

cyberjunk

04-05-2012 16:12:27

dear community,

i'm experiencing some "trouble" with newton raycasting and my room mesh.
The room-mesh is something like a building with 1 level, just a little more complex than a giant cube.
So it has a "roof" and a "floor" and possible other meshes inside it.

Now if I shoot a newton raycast from high above the building straight down the Y-axis, I get only one hit with the room-mesh, the roof intersection.
If I shoot a raycast from very below the building straight up the Y-axis, I get only one hit with the room-mesh, the floor intersection.
So it seems to include the "entry intersections" with another mesh, but not the "exit intersections".
Is there anyway to get all intersections, may be with another kind of "raycast" ?

I'm using the BasicRaycast and I'm using newton-2.33 library

C# snippet

BasicRaycast ray = new BasicRaycast(NewtonWorld, rayFrom, rayTo);
for(int i=0;i<ray.HitCount;i++)
{
BasicRaycast.BasicRaycastInfo info = ray.GetInfoAt(i)
....
}


thx for your replies :)

rahul12

19-12-2012 07:09:49

I thought that this could work but however, I see my physics object at the world origin instead of the correct location within the character's mesh. If I move the character's mesh to another location, the skeleton keeps in the same place, it doesn't move with the mesh.