浏览代码

Try reduce freezing

/develop/zombieteammanager/disableagent
Ervin Teng 4 年前
当前提交
fddb0efb
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 4
      Project/Assets/ML-Agents/Examples/PushBlock/Scripts/ZombiePushBlockDeathEnvController.cs

4
Project/Assets/ML-Agents/Examples/PushBlock/Scripts/ZombiePushBlockDeathEnvController.cs


void ResetBlock(BlockInfo block)
{
// Get a random position for the block.
block.T.position = GetRandomSpawnPos(3f, 3f);
block.T.position = GetRandomSpawnPos();
// Reset block velocity back to zero.
block.Rb.velocity = Vector3.zero;

//Reset Blocks
foreach (var item in BlocksList)
{
var pos = UseRandomBlockPosition ? GetRandomSpawnPos(2.5f, 2.5f) : item.StartingPos;
var pos = UseRandomBlockPosition ? GetRandomSpawnPos() : item.StartingPos;
var rot = UseRandomBlockRotation ? GetRandomRot() : item.StartingRot;
item.T.transform.SetPositionAndRotation(pos, rot);

正在加载...
取消
保存