diff options
author | Malfurious <m@lfurio.us> | 2022-09-08 20:31:19 -0400 |
---|---|---|
committer | Malfurious <m@lfurio.us> | 2022-09-08 20:31:19 -0400 |
commit | 7a79224edaebd9b1f9fefc3169114c8f1bcade1f (patch) | |
tree | edd30e28055535583ebb07825b1c8b34e203f161 /assets/view_model | |
parent | 44e739bb05542d1249ccf8388bd15b3f0b052e0c (diff) | |
parent | ff5e9214e671af7a7c7c238207e5d6086eba2936 (diff) | |
download | project-s-7a79224edaebd9b1f9fefc3169114c8f1bcade1f.tar.gz project-s-7a79224edaebd9b1f9fefc3169114c8f1bcade1f.zip |
Merge tag 'pull-first-map-design' of https://normalmode.org/mika/project-s
Add generic testing map
* tag 'pull-first-map-design' of https://normalmode.org/mika/project-s:
Add generic testing map
Diffstat (limited to 'assets/view_model')
-rw-r--r-- | assets/view_model/ViewModel.gd | 4 | ||||
-rw-r--r-- | assets/view_model/ViewModel.tscn | 8 |
2 files changed, 12 insertions, 0 deletions
diff --git a/assets/view_model/ViewModel.gd b/assets/view_model/ViewModel.gd index 1c29a0e..cb85117 100644 --- a/assets/view_model/ViewModel.gd +++ b/assets/view_model/ViewModel.gd @@ -11,6 +11,7 @@ var snap = Vector3.DOWN onready var character = $BaseCharacter onready var anchor = $Anchor onready var spring_arm = $Anchor/SpringArm +onready var fps_label = $fps_label func _ready(): Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED) @@ -20,6 +21,9 @@ func _process(_delta): # independently. Recouple their translations here so that the camera follows the model through # space. anchor.translation = character.translation + + # Update fps counter in HUD + fps_label.text = "FPS: " + str(Engine.get_frames_per_second()) func _physics_process(delta): # Intended movement direction with the rotational angle adjusted by the camera's aim direction diff --git a/assets/view_model/ViewModel.tscn b/assets/view_model/ViewModel.tscn index 39fffb5..0267e64 100644 --- a/assets/view_model/ViewModel.tscn +++ b/assets/view_model/ViewModel.tscn @@ -5,6 +5,7 @@ [node name="ViewModel" type="Spatial"] script = ExtResource( 2 ) +aim_sensitivity = 0.04 [node name="BaseCharacter" parent="." instance=ExtResource( 1 )] @@ -16,3 +17,10 @@ spring_length = 4.0 margin = 0.05 [node name="Camera" type="Camera" parent="Anchor/SpringArm"] +far = 500.0 + +[node name="fps_label" type="Label" parent="."] +anchor_top = 1.0 +anchor_bottom = 1.0 +margin_top = -14.0 +margin_right = 40.0 |