Optically move wielded item

User avatar
Linuxdirk
Member
 
Posts: 2107
Joined: Wed Sep 17, 2014 11:21
Location: Germany
In-game: Linuxdirk

Optically move wielded item

by Linuxdirk » Fri Dec 15, 2017 12:18

Currently I'm developing a mod that (among others) defines a nodebox that is waaay off-center the actual node and thus the image in the inventory is visually nearly not present (only a few pixels are shown) and when wielding the item it is the same.

So I wonder if there is a way to visually move the wielded item without inventory_image and wield_image set (not applicable because there might be hundreds of nodes like this having textures basing entirely on the user's texture packs and enabled mods).

Any ideas?
 

User avatar
azekill_DIABLO
Member
 
Posts: 7488
Joined: Wed Oct 29, 2014 20:05
Location: OMICRON
GitHub: azekillDIABLO
In-game: azekill_DIABLO
 

User avatar
PolySaken
Member
 
Posts: 342
Joined: Thu Nov 09, 2017 05:18
Location: djelibabi
GitHub: PolySaken-I-Am
In-game: PolySaken

Re: Optically move wielded item

by PolySaken » Sat Mar 17, 2018 07:17

wield_scale = {your position here}
obviously needs to be done by trial and error, but you'll get it eventually.
:)
 

User avatar
Linuxdirk
Member
 
Posts: 2107
Joined: Wed Sep 17, 2014 11:21
Location: Germany
In-game: Linuxdirk

Re: Optically move wielded item

by Linuxdirk » Sat Mar 17, 2018 07:49

PolySaken wrote:wield_scale = {your position here}

This seems to have no effect in 0.4.16, is it a dev version feature?

Basing on the name it just scales (stretches?) the wielditem and does not move it (or the section of the nodebox used as inventory image) to another location as described.
 

User avatar
PolySaken
Member
 
Posts: 342
Joined: Thu Nov 09, 2017 05:18
Location: djelibabi
GitHub: PolySaken-I-Am
In-game: PolySaken

Re: Optically move wielded item

by PolySaken » Sat Mar 17, 2018 07:53

i am using the latest 0.4.16 ver from the site, and it works just fine.
i don't remember how, but i used it in an old mod to make a pistol appear in the middle of the screen.
 

User avatar
Linuxdirk
Member
 
Posts: 2107
Joined: Wed Sep 17, 2014 11:21
Location: Germany
In-game: Linuxdirk

Re: Optically move wielded item

by Linuxdirk » Sat Mar 17, 2018 12:19

PolySaken wrote:i am using the latest 0.4.16 ver from the site, and it works just fine.
i don't remember how, but i used it in an old mod to make a pistol appear in the middle of the screen.

Maybe my initial description was not the best but it’s not about moving the generated wieldimage around. It’s about moving the “camera angle” that is USED to generate the wielditem.

But there seems to be no way.

So … https://github.com/minetest/minetest/issues/7140
 


Return to Modding Discussion



Who is online

Users browsing this forum: No registered users and 1 guest