void Start() { terrain = GetComponent <CustomTerrainPhysics>(); // Retrieve once public variables from CustomTerrain.cs PrimitiveCollider = terrain.primitiveCollider; PrimitiveMass = terrain.primitiveMass; // Retrieve once though methods of CustomTerrain.cs HeightmapSize = terrain.GridSize(); TerrainSize = terrain.TerrainSize(); }
void Start() { terrain = GetComponent <CustomTerrainPhysics>(); // 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; }