PointEntity Done?

Blitz3D Forums/Blitz3D Programming/PointEntity Done?

Well, DeltaYaw/DeltaPitch tell you the angle an object should rotate to to point at another object.

If, for instance, you wanted to know if the object was somewhere in front of you,doesn't matter if its a bit off then:

Function InFront(Entity,Object,Fuzz=10)
 If Abs(DeltaYaw(Entity,Object)-EntityYaw(Entity))<Fuzz Then
  If Abs(DeltaPitch(Entity,Object)-EntityPitch(Entity))<Fuzz Then
   Return 1
  EndIf
 EndIf
End Function


Coded it in the message box so who knows if it works. The fuziness is just the number of degrees pitch or yaw the entity can be pointed away from the object.