void Start() { // Get the terrain terrain = GetComponent <DeformTerrainMaster>(); // Retrieve once public variables from DeformTerrainMaster.cs LeftFootCollider = terrain.leftFootCollider; RightFootCollider = terrain.rightFootCollider; Mass = terrain.mass; ContactTime = terrain.contactTime; // Retrieve once though methods of DeformTerrainMaster.cs HeightmapSize = terrain.GridSize(); TerrainSize = terrain.TerrainSize(); }
// Start is called before the first frame update void Start() { _terrainMaster = FindObjectOfType <DeformTerrainMaster>(); _COM = testSphere.transform.position; }
// Start is called before the first frame update void Start() { _terrainMaster = FindObjectOfType <DeformTerrainMaster>(); _COM = this.GetComponent <ProjectCOM>(); }