forked from funnymemellama/funnymemellama
More debugging
Fixed noclip y movement Chenged QUAKE again Split speed overlay into H and V
This commit is contained in:
parent
ead2b57917
commit
5f0040434a
4 changed files with 15 additions and 6 deletions
5
Debug.gd
5
Debug.gd
|
@ -8,7 +8,10 @@ func _ready():
|
|||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta):
|
||||
$Speed.text = 'Speed: {0}'.format([$Player.velocity.length()])
|
||||
var v = $Player.velocity
|
||||
var hvel = sqrt(v.x ** 2 + v.z ** 2)
|
||||
var vvel = v.y
|
||||
$Speed.text = 'Speed: %6.2f, %6.2f' % [hvel, vvel]
|
||||
|
||||
|
||||
func _input(event: InputEvent):
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
extends CharacterBody3D
|
||||
|
||||
# Member variables
|
||||
const QUAKE = 8 * 0.013888888888888888
|
||||
const QUAKE = 0.0625
|
||||
const g = -800 * QUAKE
|
||||
const MAX_SPEED = 2000 * QUAKE
|
||||
const FRICTION = 4 * QUAKE
|
||||
|
@ -45,7 +45,6 @@ func _physics_process(delta):
|
|||
if Input.is_action_pressed("run"):
|
||||
fmove *= 2.0
|
||||
smove *= 2.0
|
||||
upmove *= 2.0
|
||||
|
||||
var wishvel = Vector3()
|
||||
var cam_xform: Transform3D = camera.get_global_transform()
|
||||
|
@ -54,7 +53,7 @@ func _physics_process(delta):
|
|||
wishvel = cam_basis.z * fmove + cam_basis.x * smove
|
||||
|
||||
if _noclip:
|
||||
wishvel.y = upmove
|
||||
wishvel.y += upmove
|
||||
# else:
|
||||
# wishvel.y = upmove
|
||||
|
||||
|
|
2
assets
2
assets
|
@ -1 +1 @@
|
|||
Subproject commit c82fba33a3fb4ad42210a56d670bc2271c171e98
|
||||
Subproject commit 1bb78ec55825d3d21d87ba297a5cab46dd5833cc
|
|
@ -1,4 +1,4 @@
|
|||
[gd_scene load_steps=10 format=3 uid="uid://cv8621s5oukrb"]
|
||||
[gd_scene load_steps=12 format=3 uid="uid://cv8621s5oukrb"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://dyyf1q12dchhq" path="res://Player.tscn" id="2_jba6q"]
|
||||
[ext_resource type="PackedScene" uid="uid://cp4rwojl3c3y3" path="res://test.tscn" id="3_wlkcu"]
|
||||
|
@ -17,6 +17,12 @@ font_size = 69
|
|||
outline_size = 24
|
||||
outline_color = Color(0, 0, 0, 1)
|
||||
|
||||
[sub_resource type="SystemFont" id="SystemFont_4l16k"]
|
||||
font_names = PackedStringArray("Monospace")
|
||||
|
||||
[sub_resource type="LabelSettings" id="LabelSettings_f35h2"]
|
||||
font = SubResource("SystemFont_4l16k")
|
||||
|
||||
[node name="Root" type="Node"]
|
||||
script = ExtResource("7_2k2sn")
|
||||
|
||||
|
@ -58,3 +64,4 @@ offset_top = 99.0
|
|||
offset_right = 113.0
|
||||
offset_bottom = 136.0
|
||||
text = "SPEED"
|
||||
label_settings = SubResource("LabelSettings_f35h2")
|
||||
|
|
Loading…
Reference in a new issue