added skunk works folder; added sub viewport ui option; wip testing logic
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
[gd_scene load_steps=4 format=3 uid="uid://bfp4ltw0borib"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://be64wnjbfhnhh" path="res://scenes/jet.gd" id="1_v0bd5"]
|
||||
[ext_resource type="PackedScene" uid="uid://b5btmjvj2gosl" path="res://scripts/jet_controls/controller.tscn" id="2_m0r07"]
|
||||
|
||||
[sub_resource type="BoxShape3D" id="BoxShape3D_31fu5"]
|
||||
size = Vector3(3, 2, 18)
|
||||
|
||||
[node name="jet" type="CharacterBody3D"]
|
||||
motion_mode = 1
|
||||
script = ExtResource("1_v0bd5")
|
||||
|
||||
[node name="camera" type="Camera3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 5, 18)
|
||||
far = 10000.0
|
||||
|
||||
[node name="collision" type="CollisionShape3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.17266846, -0.17565918, -1.5986328)
|
||||
shape = SubResource("BoxShape3D_31fu5")
|
||||
|
||||
[node name="target_ray" type="RayCast3D" parent="."]
|
||||
collision_mask = 8
|
||||
collide_with_areas = true
|
||||
debug_shape_custom_color = Color(0.76862746, 0, 0, 1)
|
||||
|
||||
[node name="controller" parent="." instance=ExtResource("2_m0r07")]
|
||||
@@ -0,0 +1,22 @@
|
||||
@tool
|
||||
class_name TestWorld extends Node3D
|
||||
|
||||
|
||||
|
||||
func _process(delta: float) -> void:
|
||||
var jet: Jet = $jet
|
||||
var jet2: Jet = $jet2
|
||||
var target_ray: RayCast3D = jet.get_node("target_ray")
|
||||
|
||||
var direction: Vector3 = (
|
||||
jet2.global_position - jet.global_position
|
||||
).normalized()
|
||||
target_ray.target_position = direction
|
||||
|
||||
#var target_basis = Basis.looking_at(direction, Vector3.UP)
|
||||
#var target_rotation = target_basis.get_euler()
|
||||
#var current_rotation = jet.global_rotation
|
||||
|
||||
#print(jet.global_rotation)
|
||||
#print(target_rotation)
|
||||
#jet.global_rotation = target_rotation
|
||||
@@ -0,0 +1 @@
|
||||
uid://emw28v4vimpy
|
||||
@@ -0,0 +1,13 @@
|
||||
[gd_scene load_steps=3 format=3 uid="uid://boihqkqrbm0ti"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://emw28v4vimpy" path="res://skunk_works/test_world.gd" id="1_nnwr0"]
|
||||
[ext_resource type="PackedScene" uid="uid://bfp4ltw0borib" path="res://skunk_works/jet.tscn" id="2_iba6n"]
|
||||
|
||||
[node name="test_world" type="Node3D"]
|
||||
script = ExtResource("1_nnwr0")
|
||||
|
||||
[node name="jet" parent="." instance=ExtResource("2_iba6n")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -3, 0, 0)
|
||||
|
||||
[node name="jet2" parent="." instance=ExtResource("2_iba6n")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 38, 41, 62)
|
||||
Reference in New Issue
Block a user