Procedural Tentacle Movement in Godot.
by Vicente C.
Published |
5
Share
Ashen Wing shared how they built a procedural tentacle system in Godot, using IK and raycasting.
Indie developer Ashen Wing shared a custom walk cycle they made for a Stalker-type enemy in their upcoming horror game It Breathes.

Instead of using its legs, the creature moves by pulling itself forward with tentacles growing from its back, attaching to walls and ceilings as it moves. 
The main body uses regular animation, but the tentacles were done differently. Each one is built as a simple rig with around 12 to 15 bones in a chain, and with a target node at the tip that works with Godot 4’s IK system.

Moving that target controls the end of the tentacle, while the rest of the bones follow.
To decide where the tentacle attaches, the system uses a RayCast3D. When it detects a surface, it stores that position and moves the target node there. That position is updated every frame so the tentacle stays in place even while the character is moving.

The movement itself is controlled with two states. When the tentacle is looking for a surface, it extends outward. Once it finds a valid point, it switches state and stays attached
While attached, it keeps checking the distance between the base and the tip. If that distance goes beyond a certain limit, the tentacle is pulled back.

This pullback is currently done using a lerp, followed by a short cooldown before the next extension.
enum STATES {IN, OUT}

var state = STATES.IN
var coll_point = Vector3.ZERO
var cooldown = 0.0
var max_cooldown = 1
var max_distance = 5

func _physics_process(delta):
	if cooldown > 0:
		cooldown -= delta

	if state == STATES.IN and cooldown <= 0:
		if ray_cast.is_colliding():
			coll_point = ray_cast.get_collision_point()
			state = STATES.OUT

	elif state == STATES.OUT:
		var dist = global_position.distance_to(target.global_position)

		if dist > max_distance:
			cooldown = max_cooldown
			state = STATES.IN
			target.global_position = global_position
		else:
			target.global_position = coll_point
Before settling on this solution, Ashen tried a different approach: generating the tentacle along a Path3D with a mesh updating in real time.

While this worked at first, it didn’t handle movement very well, as soon as the character moved, the path would shift and cause visible jitter, since the node isn’t designed for that kind of use.
If you want to see more from Ashen Wing or their game, take a look at the links below.  

Interested in learning more?
If you’re interested in the technical side of Unity, the Unity Shaders Pro Bundle brings together three books covering shader fundamentals, procedural shapes, and compute shaders. 
Jettelly wishes you success in your professional career! Did you find an error? No worries! Write to us at [email protected], and we'll fix it!

Subscribe to our newsletter to stay up to date with our latest offers

© 2026 Jettelly Inc. All rights reserved. Made with ❤️ in Toronto, Canada