aboutsummaryrefslogtreecommitdiff
path: root/client/map/items
diff options
context:
space:
mode:
authornokoe <nokoe@mailbox.org>2024-06-26 01:06:37 +0200
committernokoe <nokoe@mailbox.org>2024-06-26 01:07:20 +0200
commitc126d3d3e84fe3b24b42afc7f68f05342988c8c9 (patch)
tree96f50b02f83852fcf3dd53e5f48ff24526d2666f /client/map/items
parent6b40114823cac61a92756af55e06a645a3847426 (diff)
downloadhurrycurry-c126d3d3e84fe3b24b42afc7f68f05342988c8c9.tar
hurrycurry-c126d3d3e84fe3b24b42afc7f68f05342988c8c9.tar.bz2
hurrycurry-c126d3d3e84fe3b24b42afc7f68f05342988c8c9.tar.zst
add chat bubble, replace textmesh with label3d
Diffstat (limited to 'client/map/items')
-rw-r--r--client/map/items/generic_item.gd18
1 files changed, 5 insertions, 13 deletions
diff --git a/client/map/items/generic_item.gd b/client/map/items/generic_item.gd
index be9d5a0a..d1cbc41a 100644
--- a/client/map/items/generic_item.gd
+++ b/client/map/items/generic_item.gd
@@ -19,16 +19,8 @@ extends Item
func _init(owned_by_: Node3D, t: String):
super(owned_by_)
#add_child(load("res://models/prefabs/map/bag.tscn").instantiate())
- var mesh = MeshInstance3D.new()
- var text = TextMesh.new()
- var mat = StandardMaterial3D.new()
- text.text = t
- text.font = SystemFont.new()
- text.depth = 0
- mesh.mesh = text
- mesh.position.y = 0.5
- mesh.scale = Vector3(3, 3, 3)
- mat.billboard_mode = mat.BILLBOARD_ENABLED
- mat.shading_mode = BaseMaterial3D.SHADING_MODE_UNSHADED
- text.material = mat
- base.add_child(mesh)
+ var label = Label3D.new()
+ label.text = t
+ label.position.y = 0.5
+ label.billboard = BaseMaterial3D.BILLBOARD_ENABLED
+ base.add_child(label)