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
thx for your replies
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