added weapon wheel and model texture creator

This commit is contained in:
derek
2024-12-11 16:11:29 -06:00
parent 0ec82d84aa
commit 5ceaa00785
45 changed files with 1337 additions and 25 deletions

View File

@@ -0,0 +1,22 @@
@tool
extends Node3D
@onready var sub_viewport: SubViewport = $CAPTURE/SubViewport
@onready var snapshot_model: Node3D = $CAPTURE/SubViewport/snapshotModel
@export var take_snapshot : bool = false
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
if take_snapshot:
var snapshot_name = snapshot_model.get_child(0).get_name()
await get_tree().create_timer(.5).timeout
var img = sub_viewport.get_viewport().get_texture().get_image()
var image_path = "assets/Textures/ObjectTextures/%s.png" % snapshot_name
img.save_png(image_path)
take_snapshot = false