13 lines
995 B
GDScript
13 lines
995 B
GDScript
extends RefCounted
|
|
static func make(g,parent,position,radius):
|
|
var mesh=CylinderMesh.new();mesh.top_radius=radius;mesh.bottom_radius=radius;mesh.height=.13;mesh.radial_segments=32;mesh.cap_top=false;mesh.cap_bottom=false
|
|
var cuff=MeshInstance3D.new();parent.add_child(cuff);cuff.position=position;cuff.mesh=mesh;cuff.name="LeatherRestraint"
|
|
var material=ShaderMaterial.new();material.shader=preload("res://leather.gdshader");material.set_shader_parameter("tint",Color("4b2919"));cuff.material_override=material
|
|
# Double-sided leather band, stitched edges and a small dark iron buckle.
|
|
material.shader=preload("res://leather.gdshader")
|
|
for y in [-.052,.052]:
|
|
var seam=TorusMesh.new();seam.inner_radius=radius-.003;seam.outer_radius=radius+.003;seam.rings=32;seam.ring_segments=6
|
|
var edge=g.mesh_node(cuff,seam,Vector3(0,y,0),Color("72503a"));edge.material_override=g.mat(Color("72503a"))
|
|
var buckle=g.box(cuff,Vector3(radius,.0,0),Vector3(.025,.075,.065),Color("393633"))
|
|
return cuff
|