Skip to content

Commit

Permalink
Update to godot 4.2 and fix camera configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
scriptsengineer committed Mar 27, 2024
1 parent 8b1978c commit 5b919d5
Show file tree
Hide file tree
Showing 18 changed files with 492 additions and 176 deletions.
465 changes: 465 additions & 0 deletions addons/character-controller/example/main/levA221.tmp

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions addons/character-controller/example/main/level.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,8 @@ material_override = ExtResource("3_7vb8p")
[node name="Player" parent="." instance=ExtResource("2_nvo2f")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2.62268e-06, 6, 13)

[node name="Camera3D" type="Camera3D" parent="Player/Head/FirstPersonCameraReference" index="0"]

[node name="Area3D" parent="." instance=ExtResource("3_ebamq")]
transform = Transform3D(0.491574, 0, 0, 0, 1, 0, 0, 0, 0.555284, 0, -3, 5.93584)

Expand Down Expand Up @@ -463,3 +465,5 @@ environment = SubResource("Environment_7ofk6")
transform = Transform3D(-0.866025, -0.433013, 0.25, 0, 0.5, 0.866026, -0.5, 0.75, -0.433013, 0, 5, 0)
shadow_enabled = true
directional_shadow_max_distance = 250.0

[editable path="Player"]
18 changes: 9 additions & 9 deletions addons/character-controller/example/main/player.gd
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ class_name Player
func _ready():
Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED)
setup()
emerged.connect(_on_controller_emerged.bind())
submerged.connect(_on_controller_subemerged.bind())
#emerged.connect(_on_controller_emerged.bind())
#submerged.connect(_on_controller_subemerged.bind())


func _physics_process(delta):
Expand All @@ -38,7 +38,7 @@ func _physics_process(delta):
if is_valid_input:
if Input.is_action_just_pressed(input_fly_mode_action_name):
fly_ability.set_active(not fly_ability.is_actived())
var input_axis = Input.get_vector(input_back_action_name, input_forward_action_name, input_left_action_name, input_right_action_name)
var input_axis = Input.get_vector(input_left_action_name, input_right_action_name, input_back_action_name, input_forward_action_name)
var input_jump = Input.is_action_just_pressed(input_jump_action_name)
var input_crouch = Input.is_action_pressed(input_crouch_action_name)
var input_sprint = Input.is_action_pressed(input_sprint_action_name)
Expand All @@ -57,9 +57,9 @@ func _input(event: InputEvent) -> void:
rotate_head(event.relative)


func _on_controller_emerged():
camera.environment = null


func _on_controller_subemerged():
camera.environment = underwater_env
#func _on_controller_emerged():
#camera.environment = null
#
#
#func _on_controller_subemerged():
#camera.environment = underwater_env
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ dest_files=["res://.godot/imported/demo01_PixelSky.png-9dc88074652f1cf1cbde52ac5
[params]

compress/mode=3
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/bptc_ldr=0
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ dest_files=["res://.godot/imported/brickwall_g.png-94d2e7075454cf3ab1278b97aa90e
[params]

compress/mode=3
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/bptc_ldr=0
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ dest_files=["res://.godot/imported/brickwall_g2.png-924f32dc0d9a20f9f0e9298cda91
[params]

compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/bptc_ldr=0
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ dest_files=["res://.godot/imported/grass.png-c0e202dfddb17d10192fcf564284e777.ct
[params]

compress/mode=3
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/bptc_ldr=0
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ dest_files=["res://.godot/imported/grass2.png-0fa5d397d436ee4b6565c17f1af0c08e.c
[params]

compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/bptc_ldr=0
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ dest_files=["res://.godot/imported/leaves.png-158232e083d161143dba94e37a5bcc15.c
[params]

compress/mode=3
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/bptc_ldr=0
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ dest_files=["res://.godot/imported/rock.png-81ea409133a1eaa0e4c552f470d9dcf1.cte
[params]

compress/mode=3
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/bptc_ldr=0
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ dest_files=["res://.godot/imported/rock2.png-75f3e5eb3df068add9acb9f56615fb10.ct
[params]

compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/bptc_ldr=0
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ dest_files=["res://.godot/imported/water01.png-1950fe27c3e86ad5d06f46481220f0a9.
[params]

compress/mode=3
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/bptc_ldr=0
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ dest_files=["res://.godot/imported/wood.png-605cda65c97c7e2af54db348885dc9e2.cte
[params]

compress/mode=3
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/bptc_ldr=0
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=true
Expand Down
18 changes: 0 additions & 18 deletions audios/audio_interact.gd

This file was deleted.

40 changes: 0 additions & 40 deletions audios/character_audios.tscn

This file was deleted.

95 changes: 0 additions & 95 deletions audios/character_audios_3d.gd

This file was deleted.

6 changes: 3 additions & 3 deletions icon.svg.import
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://dn4kgbmdg26ea"
path="res://.godot/imported/icon.svg-bb556f2b1dcf2d69e0f0245b3f768af9.ctex"
path="res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.ctex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://addons/character-controller/icon.svg"
dest_files=["res://.godot/imported/icon.svg-bb556f2b1dcf2d69e0f0245b3f768af9.ctex"]
source_file="res://icon.svg"
dest_files=["res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.ctex"]

[params]

Expand Down
2 changes: 1 addition & 1 deletion project.godot
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ config_version=5

config/name="character-controller"
run/main_scene="res://addons/character-controller/example/main/level.tscn"
config/features=PackedStringArray("4.0", "Forward Plus")
config/features=PackedStringArray("4.2", "Forward Plus")
config/icon="res://icon.png"

[editor_plugins]
Expand Down

0 comments on commit 5b919d5

Please sign in to comment.