1. Lost Twins 2
  2. News
  3. Devlog#19: Introducing puzzle element - Toy Car

Devlog#19: Introducing puzzle element - Toy Car

Greetings, fellow adventurers! Today’s devlog is about one of our most cherished elements: the Toy Car. Inspired by the boundless imagination of childhood play, we've crafted a feature that will not only ignite nostalgia but also provide an exhilarating experience for players of all ages. We explored different options to create a seamless fusion of fun and physics and to create the perfect balance between simplicity and excitement, allowing players to control the car effortlessly while still experiencing the thrill of speed and acrobatics. Ben or Abi could ride the car to break walls, push buttons or go to unreachable areas by speeding up the car & jumping off ramps.



[previewyoutube][/previewyoutube]


Physics and Controls:

Creating the Toy Car's physics and controls was a fun challenge. Since our game isn't a racing genre, we decided to keep the car's physics relatively simple. The car would only move either left or right, so we designed compound colliders for its wheels and body. With a rigidbody added to the parent object, we could easily control the car using rigidbody.AddForce().

One interesting design decision was to make the car's visual rotate around its axis when changing direction. While it doesn't perfectly emulate real-life car behavior, this approach allowed us to navigate tight spots in some areas seamlessly. From the camera angle, the car's movements still looked natural and didn't detract from the gameplay experience.

Realistic Tire Rotation:

To add a touch of realism, we worked on achieving proper tire rotation. We used a simple circumference formula to calculate how much the tires should rotate while moving forward. Additionally, the rotation of the left or right wheels was synced with the car's direction, enhancing the immersion and giving players a sense of control.

Exciting Jumping Mechanics:

Jumping off ramps became a thrilling and dynamic part of the gameplay. We carefully scripted the jumping sequence by exposing variables in the ramp's script through the Inspector. This allowed us to control the car's trajectory while in mid-air, ensuring it would land perfectly on the other side of the jump. To add a cinematic feel, we also slowed down time during the jump, heightening the excitement for players.

[previewyoutube][INSERT Toycar2.mp4][/previewyoutube]


Responsive Trigger Colliders:

We incorporated extra trigger colliders for various purposes. Firstly, to detect whether the car was in the air or not. When the car wasn't grounded, user keypresses wouldn't generate forward thrust, making the controls feel responsive and realistic. Additionally, a front trigger collider was used to detect when a wall was in front of the car. If the user still pressed forward, the car's wheels would rotate in place, the body would shake, and a cloud of ground dust particles would be generated, enhancing the immersive experience.

[previewyoutube][/previewyoutube]

And there you have it, the captivating tale behind our beloved Toy Car adventure! We hope this devlog has given you a glimpse into the passion and creativity that went into crafting this unique and enchanting experience.


Thank you for joining us in this devlog. Stay tuned for more exciting updates and insights into the development of our game!

Best Regards,
Playdew Team