Page 1 of 1

3D ITEMS

PostPosted: Mon May 23, 2016 20:39
by Christian9
I have made many,many,many 3d lightsaber models for my upcoming starwars mod, but I don't know how to make a 3d item, can someone help? thanks in advance

Re: 3D ITEMS

PostPosted: Mon May 23, 2016 22:35
by sofar
Christian9 wrote:I have made many,many,many 3d lightsaber models for my upcoming starwars mod, but I don't know how to make a 3d item, can someone help? thanks in advance


The only way to do that is to attach an entity to a player model, as items can't be 3D models by default. Look at set_attach() and other mods that do similar this (wielditem, for instance, and car/helicopter/carts mods)

Re: 3D ITEMS

PostPosted: Tue May 24, 2016 17:00
by AiTechEye
Can player hold 3d object? (ex:holding gun)


https://forum.minetest.net/viewtopic.php?f=3&t=14297




It's possible with nodes, i made it in the gravitygun mod... nodes have the on_use and on_place functions like tools / items.

https://forum.minetest.net/viewtopic.php?f=9&t=14056


Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
minetest.register_node("gravitygun:gun2", {
   description = "Gravitygun",
   range = 10,
   stack_max = 1,
   inventory_image = "gravitygun_gun2.png",
   tiles = {"tiles"},
   groups = {dig_immediate = 3},
   paramtype = "light",
   sunlight_propagates = true,
   drawtype="mesh",
   mesh="gravitygun_gun.obj",
   on_use = function(itemstack, user, pointed_thing)
      return itemstack
   end,
   on_place = function(itemstack, user, pointed_thing)
      return itemstack
   end,
})




Image

Re: 3D ITEMS

PostPosted: Tue May 24, 2016 17:02
by Christian9
K, I'll try this

Re: 3D ITEMS

PostPosted: Tue May 24, 2016 20:46
by Christian9
Thanks UjEdwin, I might be able to implement the force as well with youre gravity gun mod. here are the lightsabers so far

Kylo Ren:
Image

Darth Vader:
Image

Anakin Skywalker:
Image

Luke Skywalker
Image

Re: 3D ITEMS

PostPosted: Tue May 24, 2016 20:54
by MineYoshi
Very Nice, but i would like the "light sword" a bit bigger...

Re: 3D ITEMS

PostPosted: Tue May 24, 2016 20:57
by Christian9
There all W.I.P, the blades will be bigger and glow