Skip to content

Commit

Permalink
客户端插件解析实体朝向非优化模式不对? #1236
Browse files Browse the repository at this point in the history
  • Loading branch information
kebiao committed May 28, 2019
1 parent b2356e3 commit 00f73e9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Assets/Plugins/kbengine/kbengine_unity3d_plugins/KBEngine.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2274,19 +2274,19 @@ private void _updateVolatileData(Int32 entityID, float x, float y, float z, floa
if(roll != KBEMath.KBE_FLT_MAX)
{
changeDirection = true;
entity.direction.x = isOptimized ? KBEMath.int82angle((SByte)roll, false) * 360 / ((float)System.Math.PI * 2) : roll;
entity.direction.x = (isOptimized ? KBEMath.int82angle((SByte)roll, false) : roll) * 360 / ((float)System.Math.PI * 2);
}

if(pitch != KBEMath.KBE_FLT_MAX)
{
changeDirection = true;
entity.direction.y = isOptimized ? KBEMath.int82angle((SByte)pitch, false) * 360 / ((float)System.Math.PI * 2) : pitch;
entity.direction.y = (isOptimized ? KBEMath.int82angle((SByte)pitch, false) : pitch) * 360 / ((float)System.Math.PI * 2);
}

if(yaw != KBEMath.KBE_FLT_MAX)
{
changeDirection = true;
entity.direction.z = isOptimized ? KBEMath.int82angle((SByte)yaw, false) * 360 / ((float)System.Math.PI * 2) : yaw;
entity.direction.z = (isOptimized ? KBEMath.int82angle((SByte)yaw, false) : yaw) * 360 / ((float)System.Math.PI * 2);
}

bool done = false;
Expand Down

0 comments on commit 00f73e9

Please sign in to comment.