void Start() { terrain = GetComponent <CustomTerrain>(); // Retrieve once public variables from CustomTerrain.cs LeftFootCollider = terrain.leftFootCollider; RightFootCollider = terrain.rightFootCollider; // Retrieve once though methods of CustomTerrain.cs HeightmapSize = terrain.GridSize(); TerrainSize = terrain.TerrainSize(); //mass = terrain.mass; //force = mass * 10f; IsPreviousLeftFootGrounded = false; IsPreviousRightFootGrounded = false; }