Basic throw works
This commit is contained in:
55
ThrowableTest.tscn
Normal file
55
ThrowableTest.tscn
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
[gd_scene load_steps=7 format=3 uid="uid://b2ajdl2vgn3vp"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" path="res://src/items/throwable/ThrowableItem.cs" id="1_ranve"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://mi70lolgtf3n" path="res://src/items/throwable/textures/GEOMANCER-DICE.png" id="2_q51af"]
|
||||||
|
[ext_resource type="Script" path="res://src/items/throwable/ThrowableItemStats.cs" id="3_dyytt"]
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_rt4sj"]
|
||||||
|
script = ExtResource("3_dyytt")
|
||||||
|
ThrowableItemTags = []
|
||||||
|
Name = "Test"
|
||||||
|
Description = ""
|
||||||
|
Texture = ExtResource("2_q51af")
|
||||||
|
SpawnRate = 0.5
|
||||||
|
|
||||||
|
[sub_resource type="BoxShape3D" id="BoxShape3D_qihtb"]
|
||||||
|
size = Vector3(0.371643, 0.289612, 0.286743)
|
||||||
|
|
||||||
|
[sub_resource type="BoxShape3D" id="BoxShape3D_03cqg"]
|
||||||
|
size = Vector3(0.778381, 0.929947, 0.731567)
|
||||||
|
|
||||||
|
[node name="Node3D" type="Node3D"]
|
||||||
|
|
||||||
|
[node name="ThrowableItem" type="Node3D" parent="."]
|
||||||
|
script = ExtResource("1_ranve")
|
||||||
|
ThrowableItemInfo = SubResource("Resource_rt4sj")
|
||||||
|
|
||||||
|
[node name="Hitbox" type="RigidBody3D" parent="ThrowableItem"]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
collision_mask = 17
|
||||||
|
|
||||||
|
[node name="Sprite" type="Sprite3D" parent="ThrowableItem/Hitbox"]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
pixel_size = 0.0005
|
||||||
|
billboard = 2
|
||||||
|
shaded = true
|
||||||
|
texture_filter = 0
|
||||||
|
render_priority = 100
|
||||||
|
texture = ExtResource("2_q51af")
|
||||||
|
|
||||||
|
[node name="CollisionShape3D" type="CollisionShape3D" parent="ThrowableItem/Hitbox"]
|
||||||
|
shape = SubResource("BoxShape3D_qihtb")
|
||||||
|
|
||||||
|
[node name="Pickup" type="Area3D" parent="ThrowableItem/Hitbox"]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
collision_layer = 0
|
||||||
|
collision_mask = 4
|
||||||
|
|
||||||
|
[node name="CollisionShape3D" type="CollisionShape3D" parent="ThrowableItem/Hitbox/Pickup"]
|
||||||
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.0600509, 0.26725, 0.180481)
|
||||||
|
shape = SubResource("BoxShape3D_03cqg")
|
||||||
|
|
||||||
|
[node name="CSGBox3D" type="CSGBox3D" parent="."]
|
||||||
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -1.10045, 0)
|
||||||
|
use_collision = true
|
||||||
|
size = Vector3(1, 1.28931, 1)
|
||||||
@@ -1,11 +1,14 @@
|
|||||||
[gd_scene load_steps=13 format=3 uid="uid://33ek675mfb5n"]
|
[gd_scene load_steps=19 format=3 uid="uid://33ek675mfb5n"]
|
||||||
|
|
||||||
[ext_resource type="Script" path="res://src/game/Game.cs" id="1_ytcii"]
|
[ext_resource type="Script" path="res://src/game/Game.cs" id="1_ytcii"]
|
||||||
[ext_resource type="Shader" path="res://src/app/App.gdshader" id="2_6ifxs"]
|
[ext_resource type="Shader" path="res://src/app/App.gdshader" id="2_6ifxs"]
|
||||||
[ext_resource type="PackedScene" uid="uid://by67pn7fdsg1m" path="res://src/map/Map.tscn" id="3_d8awv"]
|
[ext_resource type="PackedScene" uid="uid://by67pn7fdsg1m" path="res://src/map/Map.tscn" id="3_d8awv"]
|
||||||
[ext_resource type="PackedScene" uid="uid://cfecvvav8kkp6" path="res://src/player/Player.tscn" id="3_kk6ly"]
|
[ext_resource type="PackedScene" uid="uid://cfecvvav8kkp6" path="res://src/player/Player.tscn" id="3_kk6ly"]
|
||||||
|
[ext_resource type="Script" path="res://src/items/throwable/ThrowableItem.cs" id="5_2h2uw"]
|
||||||
[ext_resource type="PackedScene" uid="uid://b1muxus5qdbeu" path="res://src/ui/in_game_ui/InGameUI.tscn" id="5_lxtnp"]
|
[ext_resource type="PackedScene" uid="uid://b1muxus5qdbeu" path="res://src/ui/in_game_ui/InGameUI.tscn" id="5_lxtnp"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://dhfn51smm818x" path="res://src/items/throwable/textures/spell sign - luck.PNG" id="6_3qv3u"]
|
||||||
[ext_resource type="PackedScene" uid="uid://b16ejcwanod72" path="res://src/audio/InGameAudio.tscn" id="6_qc71l"]
|
[ext_resource type="PackedScene" uid="uid://b16ejcwanod72" path="res://src/audio/InGameAudio.tscn" id="6_qc71l"]
|
||||||
|
[ext_resource type="Script" path="res://src/items/throwable/ThrowableItemStats.cs" id="7_1lafu"]
|
||||||
[ext_resource type="Script" path="res://src/game/DialogueController.cs" id="10_58pbt"]
|
[ext_resource type="Script" path="res://src/game/DialogueController.cs" id="10_58pbt"]
|
||||||
[ext_resource type="Script" path="res://src/ui/pause_menu/PauseMenu.cs" id="11_5ng8c"]
|
[ext_resource type="Script" path="res://src/ui/pause_menu/PauseMenu.cs" id="11_5ng8c"]
|
||||||
[ext_resource type="PackedScene" uid="uid://pu6gp8de3ck4" path="res://src/ui/floor_clear/FloorClearMenu.tscn" id="11_rya1n"]
|
[ext_resource type="PackedScene" uid="uid://pu6gp8de3ck4" path="res://src/ui/floor_clear/FloorClearMenu.tscn" id="11_rya1n"]
|
||||||
@@ -21,6 +24,21 @@ shader_parameter/scale_resolution = true
|
|||||||
shader_parameter/target_resolution_scale = 4
|
shader_parameter/target_resolution_scale = 4
|
||||||
shader_parameter/enable_recolor = false
|
shader_parameter/enable_recolor = false
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_qjdoa"]
|
||||||
|
script = ExtResource("7_1lafu")
|
||||||
|
Damage = 0
|
||||||
|
ThrowableItemTags = []
|
||||||
|
Name = "Test Item"
|
||||||
|
Description = ""
|
||||||
|
Texture = ExtResource("6_3qv3u")
|
||||||
|
SpawnRate = 0.5
|
||||||
|
|
||||||
|
[sub_resource type="BoxShape3D" id="BoxShape3D_qkug6"]
|
||||||
|
size = Vector3(0.371643, 0.289612, 0.286743)
|
||||||
|
|
||||||
|
[sub_resource type="BoxShape3D" id="BoxShape3D_1clvs"]
|
||||||
|
size = Vector3(0.778381, 0.929947, 0.731567)
|
||||||
|
|
||||||
[node name="Game" type="Node3D"]
|
[node name="Game" type="Node3D"]
|
||||||
process_mode = 3
|
process_mode = 3
|
||||||
script = ExtResource("1_ytcii")
|
script = ExtResource("1_ytcii")
|
||||||
@@ -53,6 +71,38 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -2.74459, 1.22144)
|
|||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
process_mode = 1
|
process_mode = 1
|
||||||
|
|
||||||
|
[node name="ThrowableItem" type="Node3D" parent="SubViewportContainer/SubViewport/PauseContainer"]
|
||||||
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -4.52777, 3.48107, 3.48636)
|
||||||
|
script = ExtResource("5_2h2uw")
|
||||||
|
ThrowableItemInfo = SubResource("Resource_qjdoa")
|
||||||
|
|
||||||
|
[node name="Hitbox" type="RigidBody3D" parent="SubViewportContainer/SubViewport/PauseContainer/ThrowableItem"]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
collision_layer = 0
|
||||||
|
collision_mask = 17
|
||||||
|
|
||||||
|
[node name="Sprite" type="Sprite3D" parent="SubViewportContainer/SubViewport/PauseContainer/ThrowableItem/Hitbox"]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
pixel_size = 0.001
|
||||||
|
billboard = 1
|
||||||
|
shaded = true
|
||||||
|
double_sided = false
|
||||||
|
texture_filter = 0
|
||||||
|
render_priority = 100
|
||||||
|
texture = ExtResource("6_3qv3u")
|
||||||
|
|
||||||
|
[node name="CollisionShape3D" type="CollisionShape3D" parent="SubViewportContainer/SubViewport/PauseContainer/ThrowableItem/Hitbox"]
|
||||||
|
shape = SubResource("BoxShape3D_qkug6")
|
||||||
|
|
||||||
|
[node name="Pickup" type="Area3D" parent="SubViewportContainer/SubViewport/PauseContainer/ThrowableItem/Hitbox"]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
collision_layer = 0
|
||||||
|
collision_mask = 4
|
||||||
|
|
||||||
|
[node name="CollisionShape3D" type="CollisionShape3D" parent="SubViewportContainer/SubViewport/PauseContainer/ThrowableItem/Hitbox/Pickup"]
|
||||||
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.0600509, 0.26725, 0.180481)
|
||||||
|
shape = SubResource("BoxShape3D_1clvs")
|
||||||
|
|
||||||
[node name="InGameUI" parent="." instance=ExtResource("5_lxtnp")]
|
[node name="InGameUI" parent="." instance=ExtResource("5_lxtnp")]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
|
|
||||||
|
|||||||
@@ -144,7 +144,9 @@ public partial class Inventory : Node, IInventory
|
|||||||
|
|
||||||
public void Throw(IInventoryItem item)
|
public void Throw(IInventoryItem item)
|
||||||
{
|
{
|
||||||
Remove(item);
|
if (item is ThrowableItem throwable)
|
||||||
|
throwable.Throw(throwable.ThrowableItemInfo);
|
||||||
|
//Remove(item);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Drop(IInventoryItem item)
|
public void Drop(IInventoryItem item)
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
using Godot;
|
using Godot;
|
||||||
using System;
|
|
||||||
|
|
||||||
[GlobalClass]
|
|
||||||
public partial class InventoryItemStats : Resource
|
public partial class InventoryItemStats : Resource
|
||||||
{
|
{
|
||||||
[Export]
|
[Export]
|
||||||
21
src/items/throwable/Dissolve.gdshader
Normal file
21
src/items/throwable/Dissolve.gdshader
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
shader_type canvas_item;
|
||||||
|
|
||||||
|
float random(vec2 uv) {
|
||||||
|
return fract(sin(dot(uv, vec2(12.9898, 78.233))) * 438.5453);
|
||||||
|
}
|
||||||
|
|
||||||
|
uniform float sensitivity : hint_range(0.0, 1.0) = .5;
|
||||||
|
|
||||||
|
void fragment() {
|
||||||
|
// Get size of texture in pixels
|
||||||
|
float size_x = float(textureSize(TEXTURE, 0).x);
|
||||||
|
float size_y = float(textureSize(TEXTURE, 0).y);
|
||||||
|
//
|
||||||
|
vec4 pixelColor = texture(TEXTURE, UV);
|
||||||
|
// Create a new "UV" which remaps every UV value to a snapped pixel value
|
||||||
|
vec2 UVr = vec2(floor(UV.x*size_x)/size_x, floor(UV.y*size_y)/size_y);
|
||||||
|
// Determine whether pixel should be visible or not
|
||||||
|
float visible = step(sensitivity, random(UVr));
|
||||||
|
// Draw the pixel, or not depending on if it is visible or not
|
||||||
|
COLOR = vec4(pixelColor.r, pixelColor.g, pixelColor.b, min(visible, pixelColor.a));
|
||||||
|
}
|
||||||
@@ -11,7 +11,7 @@ public partial class ThrowableItem : Node3D, IInventoryItem
|
|||||||
|
|
||||||
[Dependency] public IGameRepo GameRepo => this.DependOn<IGameRepo>();
|
[Dependency] public IGameRepo GameRepo => this.DependOn<IGameRepo>();
|
||||||
|
|
||||||
[Node] public IHitbox Hitbox { get; set; } = default!;
|
[Dependency] public IGame Game => this.DependOn<IGame>();
|
||||||
|
|
||||||
public InventoryItemStats Info => ThrowableItemInfo;
|
public InventoryItemStats Info => ThrowableItemInfo;
|
||||||
|
|
||||||
@@ -26,15 +26,18 @@ public partial class ThrowableItem : Node3D, IInventoryItem
|
|||||||
|
|
||||||
[Node] public Area3D Pickup { get; set; } = default!;
|
[Node] public Area3D Pickup { get; set; } = default!;
|
||||||
|
|
||||||
public void OnReady()
|
public void OnResolved()
|
||||||
{
|
{
|
||||||
Sprite.Texture = ThrowableItemInfo.Texture;
|
Sprite.Texture = ThrowableItemInfo.Texture;
|
||||||
Pickup.BodyEntered += OnEntered;
|
Pickup.BodyEntered += OnEntered;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Throw()
|
public void Throw(ThrowableItemStats throwableItemStats)
|
||||||
{
|
{
|
||||||
GameRepo.PlayerData.Inventory.Remove(this);
|
var throwableScene = GD.Load<PackedScene>("res://src/items/throwable/ThrownItem.tscn");
|
||||||
|
var throwable = throwableScene.Instantiate<ThrownItem>();
|
||||||
|
Game.AddChild(throwable);
|
||||||
|
throwable.Throw(throwableItemStats);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Drop()
|
public void Drop()
|
||||||
@@ -48,9 +51,4 @@ public partial class ThrowableItem : Node3D, IInventoryItem
|
|||||||
if (isAdded)
|
if (isAdded)
|
||||||
QueueFree();
|
QueueFree();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnAnimationFinished(StringName animName)
|
|
||||||
{
|
|
||||||
QueueFree();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,41 +1,26 @@
|
|||||||
[gd_scene load_steps=6 format=3 uid="uid://1fl6s352e2ej"]
|
[gd_scene load_steps=3 format=3 uid="uid://1fl6s352e2ej"]
|
||||||
|
|
||||||
[ext_resource type="Script" path="res://src/items/throwable/ThrowableItem.cs" id="1_nac2l"]
|
[ext_resource type="Script" path="res://src/items/throwable/ThrowableItem.cs" id="1_nac2l"]
|
||||||
[ext_resource type="Resource" uid="uid://bph8c6by4s047" path="res://src/items/throwable/resources/GeomanticDice.tres" id="2_pefeg"]
|
|
||||||
[ext_resource type="Script" path="res://src/hitbox/Hitbox.cs" id="3_qpunu"]
|
|
||||||
|
|
||||||
[sub_resource type="BoxShape3D" id="BoxShape3D_qihtb"]
|
|
||||||
size = Vector3(0.371643, 0.289612, 0.286743)
|
|
||||||
|
|
||||||
[sub_resource type="BoxShape3D" id="BoxShape3D_03cqg"]
|
[sub_resource type="BoxShape3D" id="BoxShape3D_03cqg"]
|
||||||
size = Vector3(0.778381, 0.929947, 0.731567)
|
size = Vector3(0.778381, 0.929947, 0.731567)
|
||||||
|
|
||||||
[node name="ThrowableItem" type="Node3D"]
|
[node name="ThrowableItem" type="Node3D"]
|
||||||
script = ExtResource("1_nac2l")
|
script = ExtResource("1_nac2l")
|
||||||
ThrowableItemInfo = ExtResource("2_pefeg")
|
|
||||||
|
|
||||||
[node name="Hitbox" type="Area3D" parent="."]
|
[node name="Pickup" type="Area3D" parent="."]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
collision_layer = 16
|
collision_layer = 0
|
||||||
collision_mask = 16
|
collision_mask = 4
|
||||||
script = ExtResource("3_qpunu")
|
|
||||||
|
|
||||||
[node name="Sprite" type="Sprite3D" parent="Hitbox"]
|
[node name="CollisionShape3D" type="CollisionShape3D" parent="Pickup"]
|
||||||
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.0600509, 0.26725, 0.180481)
|
||||||
|
shape = SubResource("BoxShape3D_03cqg")
|
||||||
|
|
||||||
|
[node name="Sprite" type="Sprite3D" parent="Pickup"]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
pixel_size = 0.0005
|
pixel_size = 0.0005
|
||||||
billboard = 2
|
billboard = 2
|
||||||
shaded = true
|
shaded = true
|
||||||
texture_filter = 0
|
texture_filter = 0
|
||||||
render_priority = 100
|
render_priority = 100
|
||||||
|
|
||||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="Hitbox"]
|
|
||||||
shape = SubResource("BoxShape3D_qihtb")
|
|
||||||
|
|
||||||
[node name="Pickup" type="Area3D" parent="Hitbox"]
|
|
||||||
unique_name_in_owner = true
|
|
||||||
collision_layer = 0
|
|
||||||
collision_mask = 4
|
|
||||||
|
|
||||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="Hitbox/Pickup"]
|
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.0600509, 0.26725, 0.180481)
|
|
||||||
shape = SubResource("BoxShape3D_03cqg")
|
|
||||||
|
|||||||
@@ -5,6 +5,9 @@ namespace GameJamDungeon;
|
|||||||
[GlobalClass]
|
[GlobalClass]
|
||||||
public partial class ThrowableItemStats : InventoryItemStats
|
public partial class ThrowableItemStats : InventoryItemStats
|
||||||
{
|
{
|
||||||
|
[Export]
|
||||||
|
public int Damage { get; set; } = 0;
|
||||||
|
|
||||||
[Export]
|
[Export]
|
||||||
public Godot.Collections.Array<ThrowableItemTag> ThrowableItemTags { get; set; } = new Godot.Collections.Array<ThrowableItemTag>();
|
public Godot.Collections.Array<ThrowableItemTag> ThrowableItemTags { get; set; } = new Godot.Collections.Array<ThrowableItemTag>();
|
||||||
}
|
}
|
||||||
|
|||||||
37
src/items/throwable/ThrownItem.cs
Normal file
37
src/items/throwable/ThrownItem.cs
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
using Chickensoft.AutoInject;
|
||||||
|
using Chickensoft.GodotNodeInterfaces;
|
||||||
|
using Chickensoft.Introspection;
|
||||||
|
using GameJamDungeon;
|
||||||
|
using Godot;
|
||||||
|
|
||||||
|
[Meta(typeof(IAutoNode))]
|
||||||
|
public partial class ThrownItem : RigidBody3D
|
||||||
|
{
|
||||||
|
public override void _Notification(int what) => this.Notify(what);
|
||||||
|
|
||||||
|
[Dependency] public IGame Game => this.DependOn<IGame>();
|
||||||
|
|
||||||
|
[Node] public Sprite2D Sprite { get; set; } = default!;
|
||||||
|
|
||||||
|
private int _damage = 0;
|
||||||
|
|
||||||
|
public void OnResolved()
|
||||||
|
{
|
||||||
|
BodyEntered += ThrownItem_BodyEntered;
|
||||||
|
GlobalPosition = Game.Player.GlobalPosition + Vector3.Up;
|
||||||
|
AddCollisionExceptionWith((Node)Game.Player);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ThrownItem_BodyEntered(Node body)
|
||||||
|
{
|
||||||
|
if (body is IEnemy enemy)
|
||||||
|
enemy.EnemyLogic.Input(new EnemyLogic.Input.HitByPlayer(_damage));
|
||||||
|
QueueFree();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Throw(ThrowableItemStats throwableItemStats)
|
||||||
|
{
|
||||||
|
_damage = throwableItemStats.Damage;
|
||||||
|
ApplyCentralImpulse(Game.Player.GlobalBasis.Z.Normalized() * -20.0f);
|
||||||
|
}
|
||||||
|
}
|
||||||
48
src/items/throwable/ThrownItem.tscn
Normal file
48
src/items/throwable/ThrownItem.tscn
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
[gd_scene load_steps=7 format=3 uid="uid://b1twcuneob5kt"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" path="res://src/items/throwable/ThrownItem.cs" id="1_l0mpw"]
|
||||||
|
[ext_resource type="Shader" path="res://src/items/throwable/Dissolve.gdshader" id="2_lukp6"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://mi70lolgtf3n" path="res://src/items/throwable/textures/GEOMANCER-DICE.png" id="2_oyhi4"]
|
||||||
|
|
||||||
|
[sub_resource type="BoxShape3D" id="BoxShape3D_s4ym5"]
|
||||||
|
size = Vector3(0.288967, 0.302734, 0.28064)
|
||||||
|
|
||||||
|
[sub_resource type="ViewportTexture" id="ViewportTexture_vebu3"]
|
||||||
|
viewport_path = NodePath("Sprite3D/SubViewport")
|
||||||
|
|
||||||
|
[sub_resource type="ShaderMaterial" id="ShaderMaterial_vnlpn"]
|
||||||
|
shader = ExtResource("2_lukp6")
|
||||||
|
shader_parameter/sensitivity = 0.0
|
||||||
|
|
||||||
|
[node name="Hitbox" type="RigidBody3D"]
|
||||||
|
collision_layer = 17
|
||||||
|
collision_mask = 16
|
||||||
|
mass = 0.001
|
||||||
|
gravity_scale = 0.0
|
||||||
|
contact_monitor = true
|
||||||
|
max_contacts_reported = 1
|
||||||
|
script = ExtResource("1_l0mpw")
|
||||||
|
|
||||||
|
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
|
||||||
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.00739601, 0.0986328, 0.137878)
|
||||||
|
shape = SubResource("BoxShape3D_s4ym5")
|
||||||
|
|
||||||
|
[node name="Sprite3D" type="Sprite3D" parent="."]
|
||||||
|
billboard = 2
|
||||||
|
double_sided = false
|
||||||
|
texture = SubResource("ViewportTexture_vebu3")
|
||||||
|
|
||||||
|
[node name="SubViewport" type="SubViewport" parent="Sprite3D"]
|
||||||
|
disable_3d = true
|
||||||
|
transparent_bg = true
|
||||||
|
handle_input_locally = false
|
||||||
|
size = Vector2i(100, 100)
|
||||||
|
|
||||||
|
[node name="Sprite" type="Sprite2D" parent="Sprite3D/SubViewport"]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
z_index = 100
|
||||||
|
material = SubResource("ShaderMaterial_vnlpn")
|
||||||
|
scale = Vector2(0.1, 0.1)
|
||||||
|
texture = ExtResource("2_oyhi4")
|
||||||
|
centered = false
|
||||||
|
flip_h = true
|
||||||
Reference in New Issue
Block a user