Rotate mesh with screwdriver.

Post Reply
DoyleChris
Member
Posts: 265
Joined: Sat Jul 25, 2015 19:54
In-game: DoyleChris

Rotate mesh with screwdriver.

by DoyleChris » Post

I created a mesh in blender, exported it and works fine in minetest.
The only problem is i cant rotate it with the screwdriver.
Am i missing a setting in the init.lua or .obj.
I am at work ill post more at home.

DoyleChris
Member
Posts: 265
Joined: Sat Jul 25, 2015 19:54
In-game: DoyleChris

Re: Rotate mesh with screwdriver.

by DoyleChris » Post

here is the code for the init.lua

Code: Select all

minetest.register_node('peak:peak', {
	description = 'peak',
	drawtype = 'mesh',
	mesh = 'peak.obj',
	tiles = {'default_wood.png'},
	groups = {oddly_breakable_by_hand=2},
})
Image
Attachments
peak.jpg
peak.jpg (59.87 KiB) Viewed 378 times

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

Re: Rotate mesh with screwdriver.

by Linuxdirk » Post

Try to add paramtype2 = 'facedir' to your node definition to define that param2 is used for the orientation (face direction) of the node.

https://github.com/minetest/minetest/bl ... i.txt#L946

You don’t need to set anything manually here, just add the parameter to allow rotation of the node.

DoyleChris
Member
Posts: 265
Joined: Sat Jul 25, 2015 19:54
In-game: DoyleChris

Re: Rotate mesh with screwdriver.

by DoyleChris » Post

That solved it.

Post Reply

Who is online

Users browsing this forum: Baidu [Spider], Google [Bot] and 4 guests