Compare commits
No commits in common. "d751e1373b58b66ad1b16351c50782fed935bccc" and "a04478b5160dd18242215b5d9f1bb434ba82e799" have entirely different histories.
d751e1373b
...
a04478b516
Binary file not shown.
@ -34,7 +34,7 @@ volumetric_fog_density = 0.0
|
|||||||
[node name="CustomSkies" type="WorldEnvironment"]
|
[node name="CustomSkies" type="WorldEnvironment"]
|
||||||
environment = SubResource("Environment_8p04f")
|
environment = SubResource("Environment_8p04f")
|
||||||
script = ExtResource("2_unvmv")
|
script = ExtResource("2_unvmv")
|
||||||
rateOfTime = 100.0
|
rateOfTime = 500.0
|
||||||
skyRotation = 18.5
|
skyRotation = 18.5
|
||||||
|
|
||||||
[node name="SunMoonLine" type="Node3D" parent="."]
|
[node name="SunMoonLine" type="Node3D" parent="."]
|
||||||
@ -52,6 +52,5 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -5)
|
|||||||
|
|
||||||
[node name="MoonDirectionalLight3D" type="DirectionalLight3D" parent="SunMoonLine/MoonNodes"]
|
[node name="MoonDirectionalLight3D" type="DirectionalLight3D" parent="SunMoonLine/MoonNodes"]
|
||||||
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 0, 0, 0)
|
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 0, 0, 0)
|
||||||
light_energy = 0.05
|
light_energy = 0.01
|
||||||
light_angular_distance = 1.0
|
|
||||||
shadow_enabled = true
|
shadow_enabled = true
|
||||||
|
@ -11,13 +11,12 @@ var piloting_player: Player = null
|
|||||||
|
|
||||||
var ship_id: int = 0
|
var ship_id: int = 0
|
||||||
var ship_is_piloted: bool = false
|
var ship_is_piloted: bool = false
|
||||||
@export_range(0.01, 1.0, 0.01) var base_turn_speed: float = 0.3
|
var turn_speed: float = 10.0
|
||||||
@export var max_turn_speed: float = 0.5
|
var lift_speed: float = 10.0
|
||||||
@export_range(0.01, 1.0, 0.01) var base_lift_speed: float = 2.0
|
var top_speed: float = 10.0
|
||||||
@export var top_speed: float = 5.0
|
var move_speed: float = 10.0
|
||||||
@export var move_speed: float = 10.0
|
var acceleration: float = 10.0
|
||||||
@export var acceleration: float = 10.0
|
var deceleration: float = 20.0
|
||||||
@export var deceleration: float = 20.0
|
|
||||||
|
|
||||||
|
|
||||||
func _ready():
|
func _ready():
|
||||||
@ -34,33 +33,7 @@ func _ready():
|
|||||||
|
|
||||||
func _physics_process(delta):
|
func _physics_process(delta):
|
||||||
if ship_is_piloted:
|
if ship_is_piloted:
|
||||||
var turn_speed = base_turn_speed / max(mass, 1)
|
pass
|
||||||
var lift_speed = base_lift_speed / max(mass, 1)
|
|
||||||
if Input.is_action_pressed("move_left"):
|
|
||||||
angular_velocity.y += turn_speed
|
|
||||||
elif Input.is_action_pressed("move_right"):
|
|
||||||
angular_velocity.y -= turn_speed
|
|
||||||
else:
|
|
||||||
global_rotation.z = lerpf(global_rotation.z, 0, 0.8)
|
|
||||||
|
|
||||||
if Input.is_action_pressed("jump"):
|
|
||||||
linear_velocity.y += lift_speed
|
|
||||||
elif Input.is_action_pressed("crouch"):
|
|
||||||
linear_velocity.y -= lift_speed
|
|
||||||
|
|
||||||
if Input.is_action_pressed("move_forwards"):
|
|
||||||
var forward_force = (((-transform.basis.z * move_speed) - linear_velocity) * mass).normalized()
|
|
||||||
apply_central_force(forward_force)
|
|
||||||
elif Input.is_action_pressed("move_backwards"):
|
|
||||||
var forward_force = (((transform.basis.z * move_speed) - linear_velocity) * mass).normalized()
|
|
||||||
apply_central_force(forward_force)
|
|
||||||
|
|
||||||
|
|
||||||
angular_velocity.y = clamp(angular_velocity.y, -max_turn_speed, max_turn_speed)
|
|
||||||
|
|
||||||
# Self level slowly
|
|
||||||
global_rotation.x = lerpf(global_rotation.x, 0, 0.1)
|
|
||||||
global_rotation.z = lerpf(global_rotation.z, 0, 0.1)
|
|
||||||
|
|
||||||
|
|
||||||
func _on_area_3d_body_entered(body):
|
func _on_area_3d_body_entered(body):
|
||||||
|
BIN
godot-jolt/windows/~godot-jolt_windows-x64_editor.dll
Normal file
BIN
godot-jolt/windows/~godot-jolt_windows-x64_editor.dll
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user