mirror of
https://gitlab.com/open-fpsz/open-fpsz.git
synced 2026-07-16 00:44:50 +00:00
✨ Implement friend and foe IFF color change and fix bugs
This commit is contained in:
parent
4cead7d985
commit
4c44dc7b30
5 changed files with 43 additions and 9 deletions
|
|
@ -60,6 +60,7 @@ enum PlayerState { PLAYER_ALIVE, PLAYER_DEAD }
|
|||
signal died(player : Player, killer_id : int)
|
||||
signal energy_changed(energy : float)
|
||||
|
||||
static var pawn_player : Player
|
||||
var g : float = ProjectSettings.get_setting("physics/3d/default_gravity") # in m/s²
|
||||
var gravity : Vector3 = g * ProjectSettings.get_setting("physics/3d/default_gravity_vector")
|
||||
var _jumping : bool = false
|
||||
|
|
@ -85,6 +86,7 @@ func _ready() -> void:
|
|||
if _is_pawn():
|
||||
camera.current = true
|
||||
camera.fov = _game_settings.fov
|
||||
pawn_player = self
|
||||
# set the spring arm translation to be about head height level
|
||||
$Smoothing/SpringArm3D.transform = Transform3D().translated(Vector3(0, collision_shape.shape.height / 2, 0) * 0.9)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue