Find vertices of object

Hi ,

  I am programming boids to avoid static obstacles by using a line trace to get the object, so that I can detect which faces of the mesh the boid is facing and use that to find the closest edge the boid can move toward to get past the obstacle. Is it possible to get this information via this method? Can anyone inform me of the order of the vertices when I extract them? So that I may use them to calculate the actual faces of the mesh. Your help will be greatly appreciated, thank you.

Hello! I think there is much simplier solution - just remove velocity component which is parallel to hit normal, so you can simulate obstacle avoidance like that:

V(corrected) = V(init) - (V(init) HitNormal) HitNormal