feat: minor adjustments

This commit is contained in:
Sara 2025-06-17 19:38:43 +02:00
parent e6385e114c
commit 341ec70618
5 changed files with 52 additions and 8 deletions

2
.gitignore vendored
View file

@ -20,3 +20,5 @@ going-linux-x86_64
going-linux-x86_64.zip
going-windows-x86_64
going-windows-x86_64.zip
going-web
going-web.zip

View file

@ -72,7 +72,7 @@ void PlayerBody::enter_tree() {
}
void PlayerBody::ready() {
this->camera->set_fov(this->min_fov);
this->camera->set("dist", this->min_dist);
this->last_checkpoint = Checkpoint::save_new(this);
}
@ -82,8 +82,8 @@ void PlayerBody::process(double delta) {
input->get_axis(self_type::move_right_action, self_type::move_left_action),
input->get_axis(self_type::move_back_action, self_type::move_forward_action)
}.normalized();
float fov_target{Math::lerp(this->min_fov, this->max_speed_fov, Math::sqrt(this->get_velocity().length() / this->target_speed))};
this->camera->set_fov(Math::move_toward(this->camera->get_fov(), fov_target, float(this->max_delta_fov * delta)));
float dist_target{Math::lerp(this->min_dist, this->max_speed_dist, Math::sqrt(this->get_velocity().length() / this->target_speed))};
this->camera->set("dist", Math::move_toward(this->camera->get("dist"), dist_target, float(this->max_delta_dist * delta)));
}
void PlayerBody::physics_process(double delta) {

View file

@ -78,9 +78,9 @@ private:
double bash_time{0.25};
double extra_bash_time{0.25};
Vector2 jump_impulse{5.f, 5.f};
float max_speed_fov{100.f};
float min_fov{80.f};
double max_delta_fov{100.f};
float max_speed_dist{2.4f};
float min_dist{2.1f};
double max_delta_dist{4.f};
float model_lean{0.25f};
float model_lean_speed{0.25f};
bool can_bash{false};

View file

@ -257,8 +257,6 @@ void VictoryState::process(double delta) {
if(this->get_body()->get_velocity().length() < 0.05) {
this->get_body()->set_velocity(Vector3{});
}
float fov{this->camera->get_fov()};
this->camera->set_fov(Math::move_toward(fov, 30.f, 20.f * (float)delta));
}
void VictoryState::physics_process(double delta) {

View file

@ -106,3 +106,47 @@ Unregister-ScheduledTask -TaskName godot_remote_debug -Confirm:$false -ErrorActi
ssh_remote_deploy/cleanup_script="Stop-ScheduledTask -TaskName godot_remote_debug -ErrorAction:SilentlyContinue
Unregister-ScheduledTask -TaskName godot_remote_debug -Confirm:$false -ErrorAction:SilentlyContinue
Remove-Item -Recurse -Force '{temp_dir}'"
[preset.2]
name="Web"
platform="Web"
runnable=true
advanced_options=true
dedicated_server=false
custom_features=""
export_filter="all_resources"
include_filter=""
exclude_filter=""
export_path="../going-web/index.html"
patches=PackedStringArray()
encryption_include_filters=""
encryption_exclude_filters=""
seed=0
encrypt_pck=false
encrypt_directory=false
script_export_mode=2
[preset.2.options]
custom_template/debug="/home/sara/Documents/gd-projects/going/engine/bin/godot.web.template_release.wasm32.zip"
custom_template/release="/home/sara/Documents/gd-projects/going/engine/bin/godot.web.template_release.wasm32.zip"
variant/extensions_support=false
variant/thread_support=false
vram_texture_compression/for_desktop=true
vram_texture_compression/for_mobile=false
html/export_icon=true
html/custom_html_shell=""
html/head_include=""
html/canvas_resize_policy=2
html/focus_canvas_on_start=true
html/experimental_virtual_keyboard=false
progressive_web_app/enabled=false
progressive_web_app/ensure_cross_origin_isolation_headers=true
progressive_web_app/offline_page=""
progressive_web_app/display=1
progressive_web_app/orientation=1
progressive_web_app/icon_144x144=""
progressive_web_app/icon_180x180=""
progressive_web_app/icon_512x512=""
progressive_web_app/background_color=Color(0, 0, 0, 1)