There is an example in the Movement & Interaction Tutorial in my signature: the three last exposed actions of the third level. (It was made with A5, but the main things didn't change much.)
i dont know if it works neve rtryed but this inside the manual
> 0 Distance to the hit polygon of the next obstacle. 0 No polygon was hit. < 0 A polygon was hit from behind. The from position lies within a solid object, or the me entity intersects with a target entity.
that means result=c_trace(ect) the result = the distance trace but how doe that tell me if the fornt of the model was hit or the back? It would be nice if the bounding box had planes and each plane had a number that was returned to the trace.
if(trace_hit==1) { if(bbox_plane=1) { model hit on the front} }
Do you think this is worth addingto the futrure forum?? Malcie
You just need to calculate the angle of your trace and compare it with the angle of the hit entity. If the absolute difference between the angles is greater than, lets say, 90, the entity was hit from behind.
So you would probably do it like that: if (abs(ang(ang_to_target.pan - hit_entity.pan)) > 90 ) ...