c# - Math.Asin problem -
i calculating value ( should reflect sin of angle between direction vector , xz plane )
angle_between_direction_and_xplane = (math.abs(enemyship_.orientation.forward.y) / math.sqrt(math.pow(enemyship_.orientation.forward.x, 2) + math.pow(enemyship_.orientation.forward.y, 2) + math.pow(enemyship_.orientation.forward.z, 2)));
and seems work fine . when object perpendicular ground angle_between_direction_and_xplane near 1 , when paralel xz plane near 0 .
when apply math.asin angle ( 70 or 20 degrees ) instead values around 1 . using wrong ?
asin returns angle in radians. multiply 180/pi angle in degrees.
Comments
Post a Comment