forked from funnymemellama/funnymemellama
Merge branch 'master' of ssh://play.qtechofficial.com:9940/funnymemellama/funnymemellama
This commit is contained in:
commit
d5ee1fe306
3 changed files with 16 additions and 7 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.
|
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||||
func _process(delta):
|
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):
|
func _input(event: InputEvent):
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
extends CharacterBody3D
|
extends CharacterBody3D
|
||||||
|
|
||||||
# Member variables
|
# Member variables
|
||||||
const QUAKE = 8 * 0.013888888888888888
|
const QUAKE = 0.0625
|
||||||
const g = -800 * QUAKE
|
const g = -800 * QUAKE
|
||||||
const MAX_SPEED = 2000 * QUAKE
|
const MAX_SPEED = 2000 * QUAKE
|
||||||
const FRICTION = 4 * QUAKE
|
const FRICTION = 4# * QUAKE
|
||||||
const STOP_SPEED = 100 * QUAKE
|
const STOP_SPEED = 100 * QUAKE
|
||||||
const ACCEL= 10 * QUAKE
|
const ACCEL= 10# * QUAKE
|
||||||
const FORWARD_SPEED = 200 * QUAKE
|
const FORWARD_SPEED = 200 * QUAKE
|
||||||
const SIDE_SPEED = 350 * QUAKE
|
const SIDE_SPEED = 350 * QUAKE
|
||||||
const UP_SPEED = 270 * QUAKE
|
const UP_SPEED = 270 * QUAKE
|
||||||
|
@ -45,7 +45,6 @@ func _physics_process(delta):
|
||||||
if Input.is_action_pressed("run"):
|
if Input.is_action_pressed("run"):
|
||||||
fmove *= 2.0
|
fmove *= 2.0
|
||||||
smove *= 2.0
|
smove *= 2.0
|
||||||
upmove *= 2.0
|
|
||||||
|
|
||||||
var wishvel = Vector3()
|
var wishvel = Vector3()
|
||||||
var cam_xform: Transform3D = camera.get_global_transform()
|
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
|
wishvel = cam_basis.z * fmove + cam_basis.x * smove
|
||||||
|
|
||||||
if _noclip:
|
if _noclip:
|
||||||
wishvel.y = upmove
|
wishvel.y += upmove
|
||||||
# else:
|
# else:
|
||||||
# wishvel.y = upmove
|
# wishvel.y = upmove
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
[gd_scene load_steps=9 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://dyyf1q12dchhq" path="res://Player.tscn" id="2_jba6q"]
|
||||||
[ext_resource type="ArrayMesh" uid="uid://bqnoaomgwec3w" path="res://assets/maps/mapentities.obj" id="5_wn745"]
|
[ext_resource type="ArrayMesh" uid="uid://bqnoaomgwec3w" path="res://assets/maps/mapentities.obj" id="5_wn745"]
|
||||||
|
@ -16,6 +16,12 @@ font_size = 69
|
||||||
outline_size = 24
|
outline_size = 24
|
||||||
outline_color = Color(0, 0, 0, 1)
|
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"]
|
[node name="Root" type="Node"]
|
||||||
script = ExtResource("7_2k2sn")
|
script = ExtResource("7_2k2sn")
|
||||||
|
|
||||||
|
@ -54,3 +60,4 @@ offset_top = 99.0
|
||||||
offset_right = 113.0
|
offset_right = 113.0
|
||||||
offset_bottom = 136.0
|
offset_bottom = 136.0
|
||||||
text = "SPEED"
|
text = "SPEED"
|
||||||
|
label_settings = SubResource("LabelSettings_f35h2")
|
||||||
|
|
Loading…
Reference in a new issue