Skip to content

Get/SetBonePosePosition doc mismatch #11852

@qian2501

Description

@qian2501

Your Godot version:
4.6.1.stable.mono

Issue description:
the Skeleton3D's method SetBonePosePosition(int boneIdx, Vector3 position) is described as such:

position is a Vector3 describing a position local to the Skeleton3D node.

and GetBonePosePosition(int boneIdx):

Returns the pose position of the bone at bone_idx. The returned Vector3 is in the local coordinate space of the Skeleton3D node.

but it isn't, something as simple as this will show that it's relative to parent bone instead of Skeleton3D node:

Vector3 test = skeleton.GetBonePosePosition(boneIndex);
GD.Print(test);
skeleton.SetBonePosePosition(boneIndex, test);
GD.Print(skeleton.GetBonePosePosition(boneIndex));

although this seems dumb, if SetBonePosePosition really expect a position relative to the node, the bone will fly off because GetBonePosePosition actually returns relative to parent bone, which can be verified in editor, which in itself is a mismatch. And the actual result is the bone does not move.

URL to the documentation page:
https://docs.godotengine.org/en/4.6/classes/class_skeleton3d.html#class-skeleton3d-method-set-bone-pose-position

If you know how to fix the issue you are reporting please
consider opening a pull request. We provide a tutorial on
using git here: https://contributing.godotengine.org/en/latest/organization/pull_requests/creating_pull_requests.html,
writing documentation at https://contributing.godotengine.org/en/latest/documentation/guidelines/index.html
and contributing to the class reference here: https://contributing.godotengine.org/en/latest/documentation/class_reference.html

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions