Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get_bone_position does not return default bone position #9445

Closed
appgurueu opened this issue Feb 29, 2020 · 2 comments
Closed

get_bone_position does not return default bone position #9445

appgurueu opened this issue Feb 29, 2020 · 2 comments
Labels
Bug Issues that were confirmed to be a bug @ Script API

Comments

@appgurueu
Copy link
Contributor

Minetest version: 5.1.1

Summary

Using (minimal example):

minetest.register_globalstep(function()
    for _, player in pairs(minetest.get_connected_players()) do
        local position, rotation = player:get_bone_position("Head")
        player:set_bone_position("Head", position, rotation)
    end
end)

in a mod causes the player to look like this:

Screenshot

As position (and rotation) are {x = 0, y = 0, z = 0}, which they obviously shouldn't be.

@appgurueu appgurueu added the Unconfirmed bug Bug report that has not been confirmed to exist/be reproducible label Feb 29, 2020
@appgurueu
Copy link
Contributor Author

I have investigated and found the root cause. get_bone_position only returns values previously set with set_bone_position; it does not know about the models default bone positions at all.

@SmallJoker SmallJoker added Duplicate and removed Unconfirmed bug Bug report that has not been confirmed to exist/be reproducible labels Feb 29, 2020
@sfan5 sfan5 changed the title Bones not behaving as expected get_bone_position does not return default bone position May 16, 2020
@sfan5 sfan5 added @ Script API Bug Issues that were confirmed to be a bug and removed Duplicate labels May 16, 2020
@sfan5 sfan5 reopened this May 16, 2020
@appgurueu
Copy link
Contributor Author

The server doesn't really know about models so this can hardly be fixed there; having the client send bone positions would be odd (especially accounting for lag and animations). Mod workarounds exist (see modlib's B3D reader & character_anim's use of it). The proper way to solve the "underlying" issue is #10704.

@appgurueu appgurueu closed this as not planned Won't fix, can't repro, duplicate, stale Aug 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Issues that were confirmed to be a bug @ Script API
Projects
None yet
Development

No branches or pull requests

3 participants