Explore and play our game on itch.io:
This project is a Unity-based game development task focusing on creating a series of components that demonstrate different game-object behaviors. The components include a pendulum-like movement (Oscillator), continuous rotation (Rotator), a pulsing effect for a game-object, and the ability to hide/show a game-object using player input.
The project is divided into the following parts:
- 🔄 Oscillator Component - A component that moves a game object back and forth in a pendulum motion.
- 🔁 Rotator Component - A component that continuously rotates a game object around a specific axis.
- ❤️ Pulsating Object - A game object (sphere) that increases and decreases in size gradually, mimicking a heartbeat.
- 👁️ Hide/Show Component - A component that allows the player to toggle the visibility of a game object using a button press.
The Oscillator moves a game object back and forth in a smooth, pendulum-like motion. The movement slows down when reaching the boundaries and speeds up as it moves back to the center, similar to a real-world pendulum.
- 📐 Uses trigonometric functions to create a smooth oscillation effect.
- 🎯 The center of the oscillation is based on the initial position of the object in the scene.
- 🎛️ Parameters are customizable in Unity, allowing for control over the oscillation direction, speed, and amplitude.
The Rotator continuously rotates a game object around a specified axis at a set speed.
- 🌀 Rotation speed and axis can be configured in Unity's Inspector.
- ⚙️ Simple and reusable component for any game object that requires continuous rotation.
A spherical game object that gradually grows and shrinks in size, simulating a pulsing or heartbeat effect.
- 📏 Uses a smooth, sinusoidal function to change the object's scale over time.
- ⏱️ The pulsing speed and scale limits are adjustable via Unity's Inspector.
This component allows a game object to be hidden or displayed by pressing a button. It utilizes Unity's InputAction to manage input events.
- 👆 Toggles visibility of the game object when a specific button is pressed.
- 🛠️ Easy to assign different input keys or buttons for customization.
- 📝 Clone the project from the GitHub repository.
- 🎮 Open the project in Unity.
▶️ Play the scene to see the demonstration of all components.- 🛠️ Adjust parameters for each component in the Inspector to see how different settings affect behavior.
In the scene, each game object includes descriptive text that explains the behavior being demonstrated:
- 🆕 To create text labels, an empty GameObject with a Text Mesh Pro component is used.
- 🎨 The text properties, such as size, color, and alignment, are configured to improve visibility.
Each component includes parameters that can be adjusted directly in Unity's Inspector:
- 🔄 Oscillator: Center position, speed, direction, and amplitude.
- 🔁 Rotator: Axis of rotation and speed.
- ❤️ Pulsating Object: Pulse speed and scale range.
- 👁️ Hide/Show: Input key for toggling visibility.
- 🖥️ Unity: Ensure you have Unity installed (version 2021.3 or later recommended).
- 📦 Text Mesh Pro: If Text Mesh Pro is not installed, go to
Window > Package Manager, search for "Text Mesh Pro," and install it. This is required for displaying descriptive text in the scene.
- Vivian Umansky
- Miriam Nagar