1. Lost Twins 2
  2. News
  3. Devlog#22: Introducing Puzzle Element - Breakable Wall

Devlog#22: Introducing Puzzle Element - Breakable Wall

Greetings! We're thrilled to unveil the creative process that birthed one of our most exhilarating features - a breakwall wall. We engaged in a brainstorming session to connect a feature with the electric car. As ideas sparkled and imagination flowed, we birthed a game-changing concept: crafting a wall that yielded to the electric car's might, breaking upon impact and unlocking new pathways for our characters, making traversing the obstacle-laden terrain an essential part of the adventure.


Key Features:

1. The breakable wall must only shatter upon the car's collision. The wall has been meticulously designed to shatter upon the exact point of impact with the electric car, granting players a satisfying and realistic experience.

2. Locate an electric car within the level and utilize it to demolish the wall. The player has to make their way through the level and bring the two objects together to solve this puzzle, maneuvering the electric car to orchestrate a collision that cracks the wall.

Visual:

We went through a bunch of ideas to figure out exactly how this wall should look. In terms of visual presentation, our aim was to depict the idea using stone fragments that appear as a cohesive wall when assembled. Each individual stone mesh was given an outline to enhance its visual attractiveness.



Our team of artists constructed a wall using numerous stone meshes, skillfully combined to create the illusion of a wall that can be broken. To emphasize the impact upon collision with the car, we divided all meshes into three distinct sections. As the impact would originate from the center, we organized the meshes into a single parent for the central portion, while the left and right meshes were placed under separate parents.


Physics Mechanics:

For each stone mesh, we've affixed both a Unity built-in rigidbody and a mesh collider. Before the collision effect takes place, we've adjusted the isKinematic attribute to true. Additionally, a box collider corresponding to the wall's height has been created and properly positioned at its center.

To identify impacts, we've harnessed Unity's built-in OnCollisionEnter function. This function detects collisions and triggers our own functions for wall destruction if the colliding element is identified as an electric car, based on its layer assignment.



Wall Destruction:

Upon the wall's demolition, our initial action involves resetting the isKinematic attribute to false, thereby enabling the operation of all relevant physics principles. Subsequently, a force is applied to the stone meshes positioned at the center, aligned with the car's motion trajectory.


To make it more realistic, we've also applied torque on these stone meshes, introducing a randomized rotation effect. Following the collision, a gradual fading effect is applied to the stone meshes, culminating in the complete removal of the wall from the scene.

Feast your eyes on our captivating video that beautifully encapsulates this gameplay wonder in action.

[previewyoutube][/previewyoutube]

Stay tuned for more updates

Best regards,
Playdew team