Create a simple interactive experience in Unity. It can be based on a simple game mechanic, like billiards or bowling, or emulate a real-world task, like rearranging furniture or taking a dog for a walk.
My goal was to create a simulation game in Unity set in a serene mountainous region. The game features a cozy log cabin nestled amidst towering mountains, surrounded by lush trees, vibrant flowers, and rolling hills. Players can explore the natural beauty of the environment, interact with the landscape, and experience the peaceful atmosphere of a remote mountain retreat. One of the key interactions is the ability to chop down trees for resources, which players can use to gather wood, build, and customize their log cabin. The goal is to bring a relaxing and immersive experience where players can craft their own little haven in the heart of nature.
To create the serene mountainous environment in Unity, I started by using planes as the base for the terrain and then sculpted the landscape with Unity’s Terrain Tools, shaping mountains and hills. I downloaded terrain asset packs to add realistic textures like grass, snow, and dirt paths. I painted trees, bushes, and flowers using Unity's tree-painting tool to populate the area, giving it a lush, natural feel. For the log cabin, I used a pre-made asset from Blender, importing it into Unity and positioning it carefully to blend with the surroundings. F
Players can explore and collect resources by clicking on bushes to make them disappear. To achieve this, I ensured each bush GameObject had a Collider component to detect interactions. I then implemented a script on Visual Studio Code that responds to mouse clicks on these bushes, adding a resource to the player's inventory and deactivating the bush GameObject to simulate collection. This approach provides an intuitive way for players to gather resources within the game.
using UnityEngine;
public class DisappearOnClick : MonoBehaviour
{
// This function is called when the user clicks the mouse
void OnMouseDown()
{
// Deactivate the object
gameObject.SetActive(false);
}
}