Recreating Chameleon Twist in Unity

Опубликовано: 11 Февраль 2025
на канале: Grego
1,527
140

What that tongue do? 😩







SOURCE CODE
https://github.com/grego-git

ORIGINALLY UPLOADED ON TIK TOK:
https://vm.tiktok.com/ZMdqx9M9N/

CHECK OUT MY OTHER STUFF:
https://linktr.ee/Grego_io

Chameleon Twist is one of the biggest gaming franchises in the world, and I'm not making that up, but did you ever wonder how to implement a similar tongue attack featured in the game?

We have a player with a child transform to represent the mouth, and line render for the tongue

Holding the a button will stretch the tongue out from the mouth, with a new point created when the last two points have a distance greater than 0.5

Tilting the joystick will rotate the tongue towards it's direction by the angle specified

Each segment shoots out a raycast, and when colliding with an enemy will hold a reference to it

Let go of the a button or hold it for a specified time and the tongue will retract

For each enemy eaten our players head gets bigger and their speed gets slower

Press the a button again and our player shoots out the eaten enemies

Well that's all I got, leave a like if you learned something

#nintendo #n64 #shorts