Skip to content

Commit 9080988

Browse files
committed
客户端插件解析实体朝向非优化模式不对? #1236
1 parent 116c5c4 commit 9080988

File tree

1 file changed

+3
-3
lines changed
  • Assets/Plugins/kbengine/kbengine_unity3d_plugins

1 file changed

+3
-3
lines changed

Assets/Plugins/kbengine/kbengine_unity3d_plugins/KBEngine.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2255,19 +2255,19 @@ private void _updateVolatileData(Int32 entityID, float x, float y, float z, floa
22552255
if(roll != KBEMath.KBE_FLT_MAX)
22562256
{
22572257
changeDirection = true;
2258-
entity.direction.x = isOptimized ? KBEMath.int82angle((SByte)roll, false) * 360 / ((float)System.Math.PI * 2) : roll;
2258+
entity.direction.x = (isOptimized ? KBEMath.int82angle((SByte)roll, false) : roll) * 360 / ((float)System.Math.PI * 2);
22592259
}
22602260

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

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

22732273
bool done = false;

0 commit comments

Comments
 (0)