Skip to content

Commit 00f73e9

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

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
@@ -2274,19 +2274,19 @@ private void _updateVolatileData(Int32 entityID, float x, float y, float z, floa
22742274
if(roll != KBEMath.KBE_FLT_MAX)
22752275
{
22762276
changeDirection = true;
2277-
entity.direction.x = isOptimized ? KBEMath.int82angle((SByte)roll, false) * 360 / ((float)System.Math.PI * 2) : roll;
2277+
entity.direction.x = (isOptimized ? KBEMath.int82angle((SByte)roll, false) : roll) * 360 / ((float)System.Math.PI * 2);
22782278
}
22792279

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

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

22922292
bool done = false;

0 commit comments

Comments
 (0)