+2 votes

Hello, I want to rotate bone. I can make it with following code .

this code is in Skeleton Node and works perfect when AnimationTreePlayer is off which is setting Animation for player:

func _input(event):
    if event is InputEventMouseMotion:
        var t = get_bone_pose(1)
        t = t.rotated(Vector3(1.0, 0.0, 0.0), deg2rad(event.relative.y * 0.1))
        set_bone_pose(1, t)

but problem is that I can't rotate when AnimationTreePlayer is ON. if animation player is off my character is in T pose and I don't need this. can you help me?

asked Feb 3, 2019 in Engine by SHONKA (14 points)

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.