adde compound command calling for multi input control; added notes on dot product; testing stuff in skunk works folder
This commit is contained in:
@@ -71,5 +71,102 @@ Can we able to get the 'delta' in cpu_controller utside of '_process'/'_physics_
|
||||
If queue do we push "rotate towards using xyz pattern" as a command/state to check until met?
|
||||
|
||||
|
||||
### Thoughts on using dot product to check the normalized target position from 'to_local':
|
||||
|
||||
- https://www.youtube.com/watch?v=-udnENzlV4U
|
||||
|
||||
- From, Godot docu:
|
||||
- This (dot product) can be used to compare the angle between two vectors.
|
||||
- When using unit (normalized) vectors, the result will always
|
||||
- be between -1.0 (180 degree angle) when the vectors are facing opposite directions,
|
||||
- and 1.0 (0 degree angle) when the vectors are aligned.
|
||||
- From, GPT:
|
||||
- forward_dot represents the dot product between two normalized direction vectors.
|
||||
- It is neither radians nor degrees.
|
||||
- It tells you how closely target_direction is aligned with the forward direction (Vector3.Forward).
|
||||
|
||||
var target_direction = jet.to_local(jet2.global_position).normalized()
|
||||
var forward_dot: float = target_direction.dot(Vector3.Forward)
|
||||
var angle = rad_to_deg(acos(forward_dot))
|
||||
|
||||
| Value | Meaning | Angle |
|
||||
| 1.0 | Directly forward | 0° |
|
||||
| 0.5 | Forward, but off to the side | 60° |
|
||||
| 0.0 | Perpendicular (to the side) | 90° |
|
||||
| -0.5 | Behind, somewhat | 120° |
|
||||
| -1.0 | Directly behind | 180° |
|
||||
|
||||
I suspect Vector3.Forward is the key point to thinking about this simply. It's 0, 0, -1
|
||||
So any calculations are kinda happening localized too thus easy right angles
|
||||
It then seems to me that we have a relationship between 4 vectors:
|
||||
|
||||
jet.global_position = (100, 0, 100)
|
||||
jet2.global_position = (146, 33, 109)
|
||||
target_direction = (46, 33, 9) => normalized aprox (0.805, 0.577, 0.157) //vector pointing from jet toward jet2
|
||||
Vector3.Forward = (0, 0, -1) //Jet's local forward direction vector
|
||||
|
||||
The dot product compares the target's local direction point against the jet's forward direction point.
|
||||
forward direction point is NOT the jet's origin
|
||||
|
||||
If I add or subtract the angles derived from calculating x&-z plane and y&-z plane
|
||||
could those derive the same dot product angle?
|
||||
(46, 9) and (0, -1) with third point forming right angle
|
||||
(33, 9) and (0, -1) with third point forming right angle
|
||||
|
||||
What if I do (46, 9) and (33, 9) with third point forming right angle?
|
||||
Is there anything meaningfully gained from that?
|
||||
|
||||
|
||||
##### Dot Product Formula
|
||||
|
||||
- From, GPT:
|
||||
The formula is: A⋅B=∣A∣∣B∣cos(θ)
|
||||
|
||||
Where:
|
||||
|
||||
- `A` = Your target direction vector.
|
||||
- `B` = Your forward direction vector.
|
||||
- `θ` = Angle between the two vectors.
|
||||
- `|A|` and `|B|` = Magnitudes (lengths) of the vectors.
|
||||
|
||||
Since both vectors are normalized (length = 1), the formula simplifies to:
|
||||
|
||||
A⋅B=cos(θ)
|
||||
|
||||
You have:
|
||||
A=(0,0,1)
|
||||
B=(46,33,9)
|
||||
|
||||
1. Multiply corresponding components
|
||||
|
||||
The dot product formula is:
|
||||
A⋅B=(AxBx)+(AyBy)+(AzBz)
|
||||
|
||||
Substitute your values:
|
||||
=(0×46)+(0×33)+(1×9)
|
||||
=9
|
||||
|
||||
2. Normalize by vector lengths
|
||||
|
||||
Remember, the full formula also divides by the magnitudes when finding cosine:
|
||||
cos(θ)=A⋅B/(∣A∣∣B∣)
|
||||
|
||||
Calculate the lengths/magnitudes:
|
||||
∣A∣=sqrt(0^2+0^2+1^2)=1
|
||||
∣B∣=sqrt(46^2+33^2+9^2)
|
||||
∣B∣=sqrt(3266)≈57.15
|
||||
∣B∣=3266≈57.15
|
||||
|
||||
3. Calculate cosine
|
||||
cos(θ)=9/(1x57.15)
|
||||
cos(θ)≈0.1575
|
||||
|
||||
-- Note: 0.1575 is not radians or degrees.
|
||||
-- It's a dimensionless number representing the cosine of the angle.
|
||||
-- Think of it as an intermediate result.
|
||||
|
||||
4. Calculate the angle
|
||||
θ=cosec(0.1575) = ≈1.412 radians
|
||||
θ≈80.94degrees
|
||||
|
||||
|
||||
|
||||
@@ -31,3 +31,16 @@ enum ControllerCommand {
|
||||
THROTTLE_UP,
|
||||
THROTTLE_DOWN
|
||||
}
|
||||
|
||||
enum CompoundCommandType {
|
||||
PITCH,
|
||||
YAW,
|
||||
ROLL,
|
||||
THROTTLE,
|
||||
}
|
||||
|
||||
class CompoundCommand:
|
||||
var PITCH: int = ControllerCommand.NONE
|
||||
var YAW: int = 0
|
||||
var ROLL: int = 0
|
||||
var THROTTLE: int = 0
|
||||
|
||||
+3
-4
@@ -20,13 +20,12 @@ func _ready() -> void:
|
||||
pass
|
||||
|
||||
#func _process(delta: float) -> void:
|
||||
#var action = controller.process(delta)
|
||||
#var action: Globals.CompoundCommand = controller.process(delta)
|
||||
#if action:
|
||||
#control_frame.do_action(action, delta, self)
|
||||
|
||||
func _physics_process(delta: float) -> void:
|
||||
var action: Globals.ControllerCommand = controller.process(delta)
|
||||
|
||||
var action: Globals.CompoundCommand = controller.process(delta)
|
||||
if action:
|
||||
control_frame.do_action(action, delta, self)
|
||||
|
||||
@@ -34,7 +33,7 @@ func _physics_process(delta: float) -> void:
|
||||
move_and_slide()
|
||||
|
||||
#func _unhandled_input(event: InputEvent) -> void:
|
||||
#var action = controller.unhandled_input(event)
|
||||
#var action: Globals.CompoundCommand = controller.unhandled_input(event)
|
||||
#if not action: return
|
||||
|
||||
func set_model(model: Node) -> void:
|
||||
|
||||
@@ -8,6 +8,7 @@ size = Vector3(3, 2, 18)
|
||||
|
||||
[node name="jet" type="CharacterBody3D"]
|
||||
script = ExtResource("1_l0pwp")
|
||||
faction = null
|
||||
|
||||
[node name="camera" type="Camera3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 5, 18)
|
||||
@@ -15,6 +16,7 @@ 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)
|
||||
visible = false
|
||||
shape = SubResource("BoxShape3D_31fu5")
|
||||
|
||||
[node name="target_ray" type="RayCast3D" parent="."]
|
||||
|
||||
@@ -38,46 +38,60 @@ func process_jet_plan(jet: Jet) -> void:
|
||||
var target_direction: Vector3 = target_local_position.normalized()
|
||||
jet.target_ray.target_position = target_direction * 8
|
||||
|
||||
if maxf(target_direction.z, 0.0) == 0.0:
|
||||
get_node("../../base_ui/target_position_fb").text = "infront"
|
||||
jet.controller.cpu.no_action()
|
||||
#NOTE: When using unit (normalized) vectors, the result will always be
|
||||
# between -1.0 (180 degree angle) when the vectors are facing opposite
|
||||
# directions, and 1.0 (0 degree angle) when the vectors are aligned.
|
||||
|
||||
if target_direction.x > 0.2:
|
||||
jet.controller.cpu.yaw_right()
|
||||
elif target_direction.x < -0.2:
|
||||
jet.controller.cpu.yaw_left()
|
||||
|
||||
elif maxf(target_direction.y, 0.5) == 0.5:
|
||||
jet.controller.cpu.no_action()
|
||||
|
||||
if target_direction.y > 0.2:
|
||||
get_node("../../base_ui/target_position_ab").text = "above"
|
||||
jet.controller.cpu.pitch_up()
|
||||
elif target_direction.y < -0.2:
|
||||
get_node("../../base_ui/target_position_ab").text = "below"
|
||||
jet.controller.cpu.pitch_down()
|
||||
|
||||
elif maxf(target_direction.y, -0.5) == -0.5:
|
||||
get_node("../../base_ui/target_position_ab").text = "below"
|
||||
jet.controller.cpu.no_action()
|
||||
|
||||
if target_direction.y > 0.2:
|
||||
jet.controller.cpu.yaw_right()
|
||||
elif target_direction.y < -0.2:
|
||||
jet.controller.cpu.yaw_left()
|
||||
|
||||
else:
|
||||
get_node("../../base_ui/target_position_fb").text = "behind"
|
||||
jet.controller.cpu.no_action()
|
||||
|
||||
if target_direction.x > 0.2:
|
||||
jet.controller.cpu.yaw_right()
|
||||
elif target_direction.x < -0.2:
|
||||
jet.controller.cpu.yaw_left()
|
||||
var forward_dot: float = target_direction.dot(Vector3.UP)
|
||||
var lr_dot: float = target_direction.dot(Vector3.RIGHT)
|
||||
print(rad_to_deg(cosh(forward_dot)))
|
||||
|
||||
|
||||
get_node("../../base_ui/target_z").text = str(target_direction.z)
|
||||
get_node("../../base_ui/target_x").text = str(target_direction.x)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#if maxf(target_direction.z, 0.0) == 0.0:
|
||||
#get_node("../../base_ui/target_position_fb").text = "infront"
|
||||
#jet.controller.cpu.no_action()
|
||||
#
|
||||
#if target_direction.x > 0.2:
|
||||
#jet.controller.cpu.yaw_right()
|
||||
#elif target_direction.x < -0.2:
|
||||
#jet.controller.cpu.yaw_left()
|
||||
#
|
||||
#elif maxf(target_direction.y, 0.5) == 0.5:
|
||||
#jet.controller.cpu.no_action()
|
||||
#
|
||||
#if target_direction.y > 0.2:
|
||||
#get_node("../../base_ui/target_position_ab").text = "above"
|
||||
#jet.controller.cpu.pitch_up()
|
||||
#elif target_direction.y < -0.2:
|
||||
#get_node("../../base_ui/target_position_ab").text = "below"
|
||||
#jet.controller.cpu.pitch_down()
|
||||
#
|
||||
#elif maxf(target_direction.y, -0.5) == -0.5:
|
||||
#get_node("../../base_ui/target_position_ab").text = "below"
|
||||
#jet.controller.cpu.no_action()
|
||||
#
|
||||
#if target_direction.y > 0.2:
|
||||
#jet.controller.cpu.yaw_right()
|
||||
#elif target_direction.y < -0.2:
|
||||
#jet.controller.cpu.yaw_left()
|
||||
#
|
||||
#else:
|
||||
#get_node("../../base_ui/target_position_fb").text = "behind"
|
||||
#jet.controller.cpu.no_action()
|
||||
#
|
||||
#if target_direction.x > 0.2:
|
||||
#jet.controller.cpu.yaw_right()
|
||||
#elif target_direction.x < -0.2:
|
||||
#jet.controller.cpu.yaw_left()
|
||||
#
|
||||
#
|
||||
#get_node("../../base_ui/target_z").text = str(target_direction.z)
|
||||
#get_node("../../base_ui/target_x").text = str(target_direction.x)
|
||||
|
||||
|
||||
#var direction: Vector3 = (
|
||||
|
||||
@@ -10,27 +10,27 @@ class_name JetController extends Node
|
||||
@onready var player: Player = $player
|
||||
|
||||
|
||||
func process(delta: float) -> Globals.ControllerCommand:
|
||||
func process(delta: float) -> Globals.CompoundCommand:
|
||||
match control_mode:
|
||||
Globals.ControlMode.CPU_MODE:
|
||||
return cpu.process(delta)
|
||||
Globals.ControlMode.PLAYER_MODE:
|
||||
return player.process(delta)
|
||||
_:
|
||||
return Globals.ControllerCommand.NONE
|
||||
return Globals.CompoundCommand.new()
|
||||
|
||||
func physics_process(delta: float) -> Globals.ControllerCommand:
|
||||
func physics_process(delta: float) -> Globals.CompoundCommand:
|
||||
if Globals.ControlMode.CPU_MODE == control_mode:
|
||||
return cpu.physics_process(delta)
|
||||
elif Globals.ControlMode.PLAYER_MODE == control_mode:
|
||||
return player.physics_process(delta)
|
||||
|
||||
return Globals.ControllerCommand.NONE
|
||||
return Globals.CompoundCommand.new()
|
||||
|
||||
func unhandled_input(event: InputEvent) -> Globals.ControllerCommand:
|
||||
func unhandled_input(event: InputEvent) -> Globals.CompoundCommand:
|
||||
if Globals.ControlMode.CPU_MODE == control_mode:
|
||||
return cpu.unhandled_input(event)
|
||||
elif Globals.ControlMode.PLAYER_MODE == control_mode:
|
||||
return player.unhandled_input(event)
|
||||
|
||||
return Globals.ControllerCommand.NONE
|
||||
return Globals.CompoundCommand.new()
|
||||
|
||||
+20
-18
@@ -1,46 +1,48 @@
|
||||
class_name CPU extends Node
|
||||
|
||||
|
||||
var command: Globals.ControllerCommand = Globals.ControllerCommand.NONE
|
||||
var throttle: Globals.ControllerCommand = Globals.ControllerCommand.NONE
|
||||
var commands: Globals.CompoundCommand = Globals.CompoundCommand.new()
|
||||
|
||||
|
||||
func process(_delta: float) -> Globals.ControllerCommand:
|
||||
return command
|
||||
func process(_delta: float) -> Globals.CompoundCommand:
|
||||
return commands
|
||||
|
||||
func physics_process(_delta: float) -> Globals.ControllerCommand:
|
||||
return command
|
||||
func physics_process(_delta: float) -> Globals.CompoundCommand:
|
||||
return commands
|
||||
|
||||
func unhandled_input(_event: InputEvent) -> Globals.ControllerCommand:
|
||||
return command
|
||||
func unhandled_input(_event: InputEvent) -> Globals.CompoundCommand:
|
||||
return commands
|
||||
|
||||
|
||||
func pitch_up() -> void:
|
||||
command = Globals.ControllerCommand.PITCH_UP
|
||||
commands.PITCH = Globals.ControllerCommand.PITCH_UP
|
||||
|
||||
func pitch_down() -> void:
|
||||
command = Globals.ControllerCommand.PITCH_DOWN
|
||||
commands.PITCH = Globals.ControllerCommand.PITCH_DOWN
|
||||
|
||||
func yaw_left() -> void:
|
||||
command = Globals.ControllerCommand.YAW_LEFT
|
||||
commands.YAW = Globals.ControllerCommand.YAW_LEFT
|
||||
|
||||
func yaw_right() -> void:
|
||||
command = Globals.ControllerCommand.YAW_RIGHT
|
||||
commands.YAW = Globals.ControllerCommand.YAW_RIGHT
|
||||
|
||||
func roll_left() -> void:
|
||||
command = Globals.ControllerCommand.ROLL_LEFT
|
||||
commands.ROLL = Globals.ControllerCommand.ROLL_LEFT
|
||||
|
||||
func roll_right() -> void:
|
||||
command = Globals.ControllerCommand.ROLL_RIGHT
|
||||
commands.ROLL = Globals.ControllerCommand.ROLL_RIGHT
|
||||
|
||||
func throttle_up() -> void:
|
||||
throttle = Globals.ControllerCommand.THROTTLE_UP
|
||||
commands.THROTTLE = Globals.ControllerCommand.THROTTLE_UP
|
||||
|
||||
func throttle_down() -> void:
|
||||
throttle = Globals.ControllerCommand.THROTTLE_DOWN
|
||||
commands.THROTTLE = Globals.ControllerCommand.THROTTLE_DOWN
|
||||
|
||||
func throttle_neutral() -> void:
|
||||
throttle = Globals.ControllerCommand.NONE
|
||||
commands.THROTTLE = Globals.ControllerCommand.NONE
|
||||
|
||||
func no_action() -> void:
|
||||
command = Globals.ControllerCommand.NONE
|
||||
commands.PITCH = Globals.ControllerCommand.NONE
|
||||
commands.YAW = Globals.ControllerCommand.NONE
|
||||
commands.ROLL = Globals.ControllerCommand.NONE
|
||||
commands.THROTTLE = Globals.ControllerCommand.NONE
|
||||
|
||||
@@ -1,28 +1,42 @@
|
||||
class_name Player extends Node
|
||||
|
||||
|
||||
func process(_delta: float) -> Globals.ControllerCommand:
|
||||
var commands: Globals.CompoundCommand = Globals.CompoundCommand.new()
|
||||
|
||||
|
||||
func process(_delta: float) -> Globals.CompoundCommand:
|
||||
no_action()
|
||||
|
||||
if Input.is_action_pressed("pitch_up"):
|
||||
return Globals.ControllerCommand.PITCH_UP
|
||||
if Input.is_action_pressed("pitch_down"):
|
||||
return Globals.ControllerCommand.PITCH_DOWN
|
||||
commands.PITCH = Globals.ControllerCommand.PITCH_UP
|
||||
elif Input.is_action_pressed("pitch_down"):
|
||||
commands.PITCH = Globals.ControllerCommand.PITCH_DOWN
|
||||
|
||||
if Input.is_action_pressed("yaw_left"):
|
||||
return Globals.ControllerCommand.YAW_LEFT
|
||||
if Input.is_action_pressed("yaw_right"):
|
||||
return Globals.ControllerCommand.YAW_RIGHT
|
||||
commands.YAW = Globals.ControllerCommand.YAW_LEFT
|
||||
elif Input.is_action_pressed("yaw_right"):
|
||||
commands.YAW = Globals.ControllerCommand.YAW_RIGHT
|
||||
|
||||
if Input.is_action_pressed("roll_left"):
|
||||
return Globals.ControllerCommand.ROLL_LEFT
|
||||
if Input.is_action_pressed("roll_right"):
|
||||
return Globals.ControllerCommand.ROLL_RIGHT
|
||||
commands.ROLL = Globals.ControllerCommand.ROLL_LEFT
|
||||
elif Input.is_action_pressed("roll_right"):
|
||||
commands.ROLL = Globals.ControllerCommand.ROLL_RIGHT
|
||||
|
||||
if Input.is_action_pressed("throttle_up"):
|
||||
return Globals.ControllerCommand.THROTTLE_UP
|
||||
if Input.is_action_pressed("throttle_down"):
|
||||
return Globals.ControllerCommand.THROTTLE_DOWN
|
||||
commands.THROTTLE = Globals.ControllerCommand.THROTTLE_UP
|
||||
elif Input.is_action_pressed("throttle_down"):
|
||||
commands.THROTTLE = Globals.ControllerCommand.THROTTLE_DOWN
|
||||
|
||||
return Globals.ControllerCommand.NONE
|
||||
return commands
|
||||
|
||||
func physics_process(_delta: float) -> Globals.ControllerCommand:
|
||||
return Globals.ControllerCommand.NONE
|
||||
func physics_process(_delta: float) -> Globals.CompoundCommand:
|
||||
return Globals.CompoundCommand.new()
|
||||
|
||||
func unhandled_input(_event: InputEvent) -> Globals.ControllerCommand:
|
||||
return Globals.ControllerCommand.NONE
|
||||
func unhandled_input(_event: InputEvent) -> Globals.CompoundCommand:
|
||||
return Globals.CompoundCommand.new()
|
||||
|
||||
func no_action() -> void:
|
||||
commands.PITCH = Globals.ControllerCommand.NONE
|
||||
commands.YAW = Globals.ControllerCommand.NONE
|
||||
commands.ROLL = Globals.ControllerCommand.NONE
|
||||
commands.THROTTLE = Globals.ControllerCommand.NONE
|
||||
|
||||
@@ -14,25 +14,38 @@ var speed: float = float(MIN_SPEED)
|
||||
|
||||
|
||||
func do_action(
|
||||
action: Globals.ControllerCommand,
|
||||
action: Globals.CompoundCommand,
|
||||
delta: float,
|
||||
jet: Jet
|
||||
) -> void:
|
||||
var change_rate: float = deg_to_rad(1) * delta
|
||||
|
||||
match action:
|
||||
match action.PITCH:
|
||||
Globals.ControllerCommand.PITCH_UP:
|
||||
pitch_up(change_rate, jet)
|
||||
Globals.ControllerCommand.PITCH_DOWN:
|
||||
pitch_down(change_rate, jet)
|
||||
_:
|
||||
pass
|
||||
|
||||
match action.YAW:
|
||||
Globals.ControllerCommand.YAW_LEFT:
|
||||
yaw_left(change_rate, jet)
|
||||
Globals.ControllerCommand.YAW_RIGHT:
|
||||
yaw_right(change_rate, jet)
|
||||
_:
|
||||
pass
|
||||
|
||||
if action.YAW == Globals.ControllerCommand.NONE:
|
||||
match action.ROLL:
|
||||
Globals.ControllerCommand.ROLL_LEFT:
|
||||
roll_left(change_rate, jet)
|
||||
Globals.ControllerCommand.ROLL_RIGHT:
|
||||
roll_right(change_rate, jet)
|
||||
_:
|
||||
pass
|
||||
|
||||
match action.THROTTLE:
|
||||
Globals.ControllerCommand.THROTTLE_UP:
|
||||
throttle_up(delta)
|
||||
Globals.ControllerCommand.THROTTLE_DOWN:
|
||||
|
||||
+31
-13
@@ -1,22 +1,40 @@
|
||||
@tool
|
||||
class_name TestWorld extends Node3D
|
||||
|
||||
|
||||
|
||||
func _process(delta: float) -> void:
|
||||
var jet: Jet = $jet
|
||||
var jet2: Jet = $jet2
|
||||
var jet: Node3D = $jet
|
||||
var jet2: Node3D = $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 direction: Vector3 = (
|
||||
#jet2.global_position - jet.global_position
|
||||
#).normalized()
|
||||
var target_direction = jet.to_local(jet2.global_position).normalized()
|
||||
#var target_direction = jet.to_local(jet2.global_position)
|
||||
|
||||
#var target_basis = Basis.looking_at(direction, Vector3.UP)
|
||||
#var target_rotation = target_basis.get_euler()
|
||||
#var current_rotation = jet.global_rotation
|
||||
target_ray.target_position = target_direction * 2
|
||||
|
||||
#print(jet.global_rotation)
|
||||
#print(target_rotation)
|
||||
#jet.global_rotation = target_rotation
|
||||
# NOTE: (From GPT) Mostly works but with precession nor do I really understand it...
|
||||
#var forward_dot: float = target_direction.dot(Vector3.UP)
|
||||
#print(forward_dot)
|
||||
#print(jet.rotation.angle_to())
|
||||
#print("Up: " + str((target_direction).dot(Vector3.UP)) )
|
||||
print("Forward: " + str((target_direction).dot(Vector3.FORWARD)) )
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# NOTE: (From GPT) Mostly works but with precession nor do I really understand it...
|
||||
#var forward_dot: float = target_direction.dot(Vector3.UP)
|
||||
#if forward_dot >= cos(deg_to_rad(37.5)):
|
||||
#get_node("../../base_ui/target_position_fb").text = "infront"
|
||||
#jet.controller.cpu.no_action()
|
||||
#else:
|
||||
#get_node("../../base_ui/target_position_fb").text = "behind"
|
||||
#if target_direction.x >= 0.2:
|
||||
#jet.controller.cpu.yaw_right()
|
||||
#elif target_direction.x <= -0.2:
|
||||
#jet.controller.cpu.yaw_left()
|
||||
|
||||
+111
-6
@@ -1,13 +1,118 @@
|
||||
[gd_scene load_steps=3 format=3 uid="uid://boihqkqrbm0ti"]
|
||||
[gd_scene load_steps=15 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"]
|
||||
[ext_resource type="PackedScene" uid="uid://bhjfvc7gkrvah" path="res://base_environment.tscn" id="2_iba6n"]
|
||||
|
||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_iba6n"]
|
||||
albedo_color = Color(1, 1, 0.3882353, 1)
|
||||
emission_enabled = true
|
||||
emission = Color(1, 1, 0.3882353, 1)
|
||||
|
||||
[sub_resource type="BoxMesh" id="BoxMesh_711dk"]
|
||||
material = SubResource("StandardMaterial3D_iba6n")
|
||||
|
||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_5o00y"]
|
||||
albedo_color = Color(0.49803922, 0.49411765, 0, 1)
|
||||
emission_enabled = true
|
||||
emission = Color(0.49805313, 0.49511182, 0, 1)
|
||||
|
||||
[sub_resource type="BoxMesh" id="BoxMesh_8ov77"]
|
||||
material = SubResource("StandardMaterial3D_5o00y")
|
||||
|
||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_711dk"]
|
||||
albedo_color = Color(0.5882353, 0.20392157, 0, 1)
|
||||
emission_enabled = true
|
||||
emission = Color(0.5882353, 0.20392157, 0, 1)
|
||||
|
||||
[sub_resource type="BoxMesh" id="BoxMesh_5o00y"]
|
||||
material = SubResource("StandardMaterial3D_711dk")
|
||||
|
||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_8ov77"]
|
||||
albedo_color = Color(1, 0.23529412, 0.09411765, 1)
|
||||
emission_enabled = true
|
||||
emission = Color(1, 0.23529412, 0.09411765, 1)
|
||||
|
||||
[sub_resource type="BoxMesh" id="BoxMesh_xfwsp"]
|
||||
material = SubResource("StandardMaterial3D_8ov77")
|
||||
|
||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_xfwsp"]
|
||||
albedo_color = Color(0, 0.33333334, 0.80784315, 1)
|
||||
emission_enabled = true
|
||||
emission = Color(0, 0.33333334, 0.80784315, 1)
|
||||
|
||||
[sub_resource type="BoxMesh" id="BoxMesh_ggpwi"]
|
||||
material = SubResource("StandardMaterial3D_xfwsp")
|
||||
|
||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_ggpwi"]
|
||||
albedo_color = Color(0, 0.18431373, 0.4745098, 1)
|
||||
emission_enabled = true
|
||||
emission = Color(0, 0.18431373, 0.4745098, 1)
|
||||
|
||||
[sub_resource type="BoxMesh" id="BoxMesh_530sk"]
|
||||
material = SubResource("StandardMaterial3D_ggpwi")
|
||||
|
||||
[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="base_environment" parent="." instance=ExtResource("2_iba6n")]
|
||||
|
||||
[node name="jet2" parent="." instance=ExtResource("2_iba6n")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 38, 41, 62)
|
||||
[node name="jet" type="Node3D" parent="."]
|
||||
|
||||
[node name="target_ray" type="RayCast3D" parent="jet"]
|
||||
|
||||
[node name="up" type="MeshInstance3D" parent="jet"]
|
||||
transform = Transform3D(0.5, 0, 0, 0, 0.5, 0, 0, 0, 0.5, 0, 2, 0)
|
||||
mesh = SubResource("BoxMesh_711dk")
|
||||
|
||||
[node name="down" type="MeshInstance3D" parent="jet"]
|
||||
transform = Transform3D(0.5, 0, 0, 0, 0.5, 0, 0, 0, 0.5, 0, -2, 0)
|
||||
mesh = SubResource("BoxMesh_8ov77")
|
||||
|
||||
[node name="left" type="MeshInstance3D" parent="jet"]
|
||||
transform = Transform3D(0.5, 0, 0, 0, 0.5, 0, 0, 0, 0.5, -2, 0, 0)
|
||||
mesh = SubResource("BoxMesh_5o00y")
|
||||
|
||||
[node name="right" type="MeshInstance3D" parent="jet"]
|
||||
transform = Transform3D(0.5, 0, 0, 0, 0.5, 0, 0, 0, 0.5, 2, 0, 0)
|
||||
mesh = SubResource("BoxMesh_xfwsp")
|
||||
|
||||
[node name="back" type="MeshInstance3D" parent="jet"]
|
||||
transform = Transform3D(0.5, 0, 0, 0, 0.5, 0, 0, 0, 0.5, 0, 0, 2)
|
||||
mesh = SubResource("BoxMesh_ggpwi")
|
||||
|
||||
[node name="forward" type="MeshInstance3D" parent="jet"]
|
||||
transform = Transform3D(0.5, 0, 0, 0, 0.5, 0, 0, 0, 0.5, 0, 0, -2)
|
||||
mesh = SubResource("BoxMesh_530sk")
|
||||
|
||||
[node name="jet2" type="Node3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 3.4830952, 10.637592, -22.128391)
|
||||
|
||||
[node name="target_ray" type="RayCast3D" parent="jet2"]
|
||||
|
||||
[node name="up" type="MeshInstance3D" parent="jet2"]
|
||||
transform = Transform3D(0.5, 0, 0, 0, 0.5, 0, 0, 0, 0.5, 0, 2, 0)
|
||||
mesh = SubResource("BoxMesh_711dk")
|
||||
|
||||
[node name="down" type="MeshInstance3D" parent="jet2"]
|
||||
transform = Transform3D(0.5, 0, 0, 0, 0.5, 0, 0, 0, 0.5, 0, -2, 0)
|
||||
mesh = SubResource("BoxMesh_8ov77")
|
||||
|
||||
[node name="left" type="MeshInstance3D" parent="jet2"]
|
||||
transform = Transform3D(0.5, 0, 0, 0, 0.5, 0, 0, 0, 0.5, -2, 0, 0)
|
||||
mesh = SubResource("BoxMesh_5o00y")
|
||||
|
||||
[node name="right" type="MeshInstance3D" parent="jet2"]
|
||||
transform = Transform3D(0.5, 0, 0, 0, 0.5, 0, 0, 0, 0.5, 2, 0, 0)
|
||||
mesh = SubResource("BoxMesh_xfwsp")
|
||||
|
||||
[node name="back" type="MeshInstance3D" parent="jet2"]
|
||||
transform = Transform3D(0.5, 0, 0, 0, 0.5, 0, 0, 0, 0.5, 0, 0, 2)
|
||||
mesh = SubResource("BoxMesh_ggpwi")
|
||||
|
||||
[node name="forward" type="MeshInstance3D" parent="jet2"]
|
||||
transform = Transform3D(0.5, 0, 0, 0, 0.5, 0, 0, 0, 0.5, 0, 0, -2)
|
||||
mesh = SubResource("BoxMesh_530sk")
|
||||
|
||||
[node name="camera" type="Camera3D" parent="."]
|
||||
transform = Transform3D(0.45554495, -0.23939586, 0.8574196, 0, 0.96316254, 0.26891983, -0.8902128, -0.12250507, 0.43876383, 20.807, 12.386, 0.178)
|
||||
current = true
|
||||
|
||||
Reference in New Issue
Block a user