tweaks to ai, pickup drops, and added scene image capturerer
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
@tool
|
||||
extends Node3D
|
||||
class_name TextureCamera
|
||||
|
||||
@onready var sub_viewport: SubViewport = $CAPTURE/SubViewport
|
||||
@onready var snapshot_model: Node3D = $CAPTURE/SubViewport/snapshotModel
|
||||
|
||||
@export var path : String = "assets/Textures/ObjectTextures/%s.png"
|
||||
@export var take_snapshot : bool = false
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
@@ -17,6 +19,6 @@ func _process(delta: float) -> void:
|
||||
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
|
||||
var image_path = path % snapshot_name
|
||||
img.save_png(image_path)
|
||||
take_snapshot = false
|
||||
|
||||
Reference in New Issue
Block a user