summaryrefslogtreecommitdiffstats
path: root/assets/view_model/ViewModel.gd
diff options
context:
space:
mode:
authorMalfurious <m@lfurio.us>2022-09-12 02:11:27 -0400
committerMalfurious <m@lfurio.us>2022-09-12 02:11:27 -0400
commit40a9b7b7fb7d6e0312ae610b527d18fb2d708ba7 (patch)
treefe6dd1fbffaa093fc55aec747c22a8b350aa85f8 /assets/view_model/ViewModel.gd
parentf44398ea774c171d9aa0f274f603101c7a1186b9 (diff)
downloadproject-s-40a9b7b7fb7d6e0312ae610b527d18fb2d708ba7.tar.gz
project-s-40a9b7b7fb7d6e0312ae610b527d18fb2d708ba7.zip
Decouple ViewModel and the BaseCharacter
The ViewModel now consists of the camera, controls, and character driving logic. The actual character model has been removed and is expected to be externally present in the scene. An exported variable is added to reference the player object that the view model is to be controlling. This will allow us to place multiple characters in a scene and change the view model's perspective on the fly. Both of the current maps have been updated to implement this properly, and add an extra character on the enemy team. Signed-off-by: Malfurious <m@lfurio.us>
Diffstat (limited to 'assets/view_model/ViewModel.gd')
-rw-r--r--assets/view_model/ViewModel.gd2
1 files changed, 1 insertions, 1 deletions
diff --git a/assets/view_model/ViewModel.gd b/assets/view_model/ViewModel.gd
index cb85117..8a818a3 100644
--- a/assets/view_model/ViewModel.gd
+++ b/assets/view_model/ViewModel.gd
@@ -8,7 +8,7 @@ export var gravity = 35
var velocity = Vector3.ZERO
var snap = Vector3.DOWN
-onready var character = $BaseCharacter
+export(NodePath) onready var character = get_node(character)
onready var anchor = $Anchor
onready var spring_arm = $Anchor/SpringArm
onready var fps_label = $fps_label