Files
SpaceBots/actors/Enemies/Spider/rotationLock.gd

15 lines
324 B
GDScript3
Raw Normal View History

2026-01-21 23:40:20 +01:00
extends Skeleton3D
var bones: Array[int] = [6,11,16,21,26,31,36,41]
var boneRotations: Array[Quaternion]
func _ready() -> void:
for bone in bones:
boneRotations.push_back(get_bone_pose_rotation(bone))
func _process(delta: float) -> void:
var x = 0
for bone in bones:
set_bone_pose(bone, boneRotations[x])
x += 1