I haven't found the functions Delatyaw and deltapitch in minib3d.
Function DeltaYaw:Double( p_eEntity1:TEntity, p_eEntity2:TEntity )
Local l_dx:Double = 0.0
Local l_dz:Double = 0.0
l_dx = EntityX(p_eEntity2 ) - EntityX(p_eEntity1 )
l_dz = EntityZ(p_eEntity2 ) - EntityZ(p_eEntity1 )
Return( -ATan2(l_dx, l_dz) )
End Function
Function DeltaPitch:Double( p_eEntity1:TEntity, p_eEntity2:TEntity )
Local l_dx:Double = 0.0
Local l_dy:Double = 0.0
Local l_dz:Double = 0.0
l_dx = EntityX(p_eEntity2 ) - EntityX(p_eEntity1 )
l_dy = EntityY(p_eEntity2 ) - EntityY(p_eEntity1 )
l_dz = EntityZ(p_eEntity2 ) - EntityZ(p_eEntity1 )
Return( -ATan2(l_dy, Sqr(l_dx*l_dx + l_dz*l_dz)) )
End Function
|