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

Wieldhand is "detached" from player body #12582

Open
Wuzzy2 opened this issue Jul 22, 2022 · 12 comments
Open

Wieldhand is "detached" from player body #12582

Wuzzy2 opened this issue Jul 22, 2022 · 12 comments
Labels
@ Client / Audiovisuals Feature request Issues that request the addition or enhancement of a feature

Comments

@Wuzzy2
Copy link
Contributor

Wuzzy2 commented Jul 22, 2022

Problem

This is an issue that affects most, but not all games.

A lot of games need a hand, and they use it as the "default tool". And therefore the games need a rendering for the wieldhand image.
The common method is to just set wield_image of the hand item ("") and you're done. This is the most common solution, used by many games including Minetest Game.

However, the problem with that is if you start digging, you can clearly see the hand is "detached" from your body, which looks wrong. (Just dig and watch your wieldhand to see it).

Solutions

Provide some builtin mechanisms/APIs/code/whatever to create a more realistic-looking hand, especially in such a way that you never see a "detached" hand ever again.

I'm fine with any solution that allows games to have a "non-detached" hand.

Idea 1 (custom wield mesh)

Allow for a custom mesh as wielditem for any item and maybe with an optional offset/rotation/custom dig animation. Because currently, wielditems are pretty much hardcoded (always derived from other item data).

Idea 2 (stretchhand)

For the hand item (""), double the height of the wield_image, putting the original image at the top half and fill each row of the lower half with the bottom-most row of the original texture. This basically "stretches" the texture, which I call the "stretchhand".

The generated image will become the "true" wield image. However, the wieldhand probably needs to be scaled/offset accordingly so that at the end, the wieldhand has the same size/position on the screen as before.

Now, if the dig animation plays, the "lower end" of the wieldhand should never be seen (is always off-camera).

Obviously, this assumes the result will always make sense for all games but for some games, a stretchhand might still be undesirable (esp. if the default tool is not actually a hand but something mechanical when you play as a robot, etc.). Therefore, a fallback mechanism should be present if this idea is used.

Idea 3 (secondary wield image)

Same as idea 2, but more manual. Let the dev add a "secondary wield image" for items. This secondary image will be copied into the lower half of the doubled texture. Everything else is the same as in idea 2. By default (if the "secondary wield image" is missing), the wieldhand behaves as before.

More?

If you have a better idea, please write!

Alternatives

Some games have used a workaround by adding a "fake node" to the game and override the player hand with them (using the special "hand" inventory list). These fake nodes are meshnodes that are long enough so they never look "detached" while you dig.
MineClone 2 does this. These fake nodes are not used for anything else.

Here is a mod that does this: https://forum.minetest.net/viewtopic.php?t=16435

This works, but it's quite hacky IMO, because you need to add an awkward fake node. Also, I think the animation still looks slightly off to me. It's not possible to customize the digging animation anyway, so this workaround has an obvious limitation as well.

So I would like it more if there would be a more "official" and clean solution that doesn't rely on hacks.

@Wuzzy2 Wuzzy2 added the Feature request Issues that request the addition or enhancement of a feature label Jul 22, 2022
@erlehmann
Copy link
Contributor

MineClone 2 does this. These fake nodes are not used for anything else.

They are occasionally used to surprise players – by lending them a hand … ;)

I think the fake node is okay. The dig animation should be customizable though!

@RecentRunner
Copy link

RecentRunner commented Aug 12, 2022

+1 The current animation/hand just looks jarring, if it's possible to change this I would 100% be for it

@sfan5
Copy link
Member

sfan5 commented Aug 12, 2022

For customizable animations see #2811, #10333.

@RecentRunner
Copy link

RecentRunner commented Aug 13, 2022

I think the fake node is okay. The dig animation should be customizable though!

I think I agree with Wuzzy on this one, the fake node seems hacky. While I prefer it to the default flying pork-chop hand, I don't think the game should be required to make a fake node for something as simple as a free-hand.

Perhaps we can just get rid of the hand to side-step the problem all together? Although I can see this causing WAYY more problems than it solves Edit: Actually nevermind I think this solution could work? Though, I would prefer a proper solution over removing the hand completely

That being said giving someone a "hand" is peak comedy

@Thepotato2
Copy link

I think the animation needs to be almost the same as the real game, but thats just me :)

@Thepotato2
Copy link

i think it would make the game feel even more like minecraft.

@FossFanatic
Copy link

the real game

Minetest is not trying to be a clone of Minecraft anymore, so that wording is kind of off.

@Thepotato2
Copy link

oof really? i did not know that XD

@Bituvo
Copy link
Contributor

Bituvo commented Nov 21, 2023

i think it would make the game feel even more like minecraft.

In this case, it's just a design issue whose resolution appears the same as another implementation.

@nininik0
Copy link

There is a mod named newhand that adds a hand with character.png and It is a node and that when you dig it actually doesn't disconnect from your body.

@RecentRunner
Copy link

RecentRunner commented Mar 19, 2024

There is a mod named newhand that adds a hand with character.png and It is a node and that when you dig it actually doesn't disconnect from your body.

Do you have a link to the mod?

Edit: Is this the one? https://github.com/jordan4ibanez/newhand

Edit 2: Okay so I quickly tested it out and the hand is definitely not detached. But I feel like the animation could use some work. I posted a quick video demoing the mod

https://youtu.be/hBJtZEERobs

Comparing that to Minecraft's punch animation the mod feels far more stiff (Shamelessly taken from the Minecraft wiki's breaking page)

PunchTrees-GetWood

@nininik0
Copy link

nininik0 commented Mar 20, 2024

There is a mod named newhand that adds a hand with character.png and It is a node and that when you dig it actually doesn't disconnect from your body.

Do you have a link to the mod?

Edit: Is this the one? https://github.com/jordan4ibanez/newhand

Edit 2: Okay so I quickly tested it out and the hand is definitely not detached. But I feel like the animation could use some work. I posted a quick video demoing the mod

https://youtu.be/hBJtZEERobs

Comparing that to Minecraft's punch animation the mod feels far more stiff (Shamelessly taken from the Minecraft wiki's breaking page)

Well the hand is a mesh so technically you are holding a block so no wonder it is so stiff it's the default wielding thing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@ Client / Audiovisuals Feature request Issues that request the addition or enhancement of a feature
Projects
None yet
Development

No branches or pull requests

8 participants