Procedural Worm Behavior Template

This template provides a simple yet effective system for creating a procedural worm, snake, or centipede. The behavior is driven by a head object that you control, with the body segments automatically following it, creating a fluid, organic movement.

Key Features:

  • Customizable Segments: Easily change the number of body segments in the "Repeat" loop.
  • Dynamic Following: Each body segment follows the one in front of it, creating a natural, chain-like motion.
  • Automatic Scaling: The body segments automatically scale down in size, making the tail look thinner.
  • Simple Control: The worm's head follows the mouse cursor, allowing for intuitive and easy navigation.
  • Responsive Creation: A new worm can be spawned with a simple left-click, perfect for creating multiple entities or restarting the game.

How it Works:

The system uses a parent-child relationship. The "head" object is the parent, and the "body" segments are the children. The core logic is built around the UlttoFollow variable, which tells each body segment which other object it should follow. The system uses a simple formula to position the body segments behind the head, maintaining a constant distance. This setup makes it easy to modify and expand upon, whether you want to add new behaviors, change the number of segments, or alter the speed of the worm. Video demo

Purchase

Buy Now$1.00 USD or more

In order to download this asset pack you must purchase it at or above the minimum price of $1 USD. You will get access to the following files:

worm circular Exemple.capx 194 kB

Leave a comment

Log in with itch.io to leave a comment.