Fix viewing angles for player's camera, change gitignore, initialize .NET project.#4
Open
dnesov wants to merge 4 commits intoSCP-Godot:mainfrom
Open
Fix viewing angles for player's camera, change gitignore, initialize .NET project.#4dnesov wants to merge 4 commits intoSCP-Godot:mainfrom
dnesov wants to merge 4 commits intoSCP-Godot:mainfrom
Conversation
rezbyte
suggested changes
Dec 13, 2022
Collaborator
rezbyte
left a comment
There was a problem hiding this comment.
Looking good so far!
I've added my suggestions in the comments.
This error appears when opening the project:
E 0:00:00:0384 read_all_file_utf8: Cannot open file 'res://Source/SCPCB/TestAutoload.cs'.
<C++ Error> Condition "err != OK" is true. Returning: err
<C++ Source> modules/mono/utils/string_utils.cpp:152 @ read_all_file_utf8()
The fix is changing line 49 in project.godot to:
TestAutoload="*res://Source/SCPCB/Autoloads/TestAutoload.cs"
|
|
||
| # VSCode | ||
| .vscode/* | ||
| .vscode/*/** |
Collaborator
There was a problem hiding this comment.
Suggested change
| .vscode/*/** | |
| .vscode |
Excluding a directory also excludes it's sub-directories.
|
|
||
| direction += -cam_transform.basis.z * input_vector.y | ||
| direction += cam_transform.basis.x * input_vector.x | ||
| direction = cam_transform.basis * Vector3(input_vector.x, 0, input_vector.y) |
Collaborator
There was a problem hiding this comment.
Suggested change
| direction = cam_transform.basis * Vector3(input_vector.x, 0, input_vector.y) | |
| direction = cam_transform.basis * Vector3(input_vector.x, 0.0, input_vector.y) |
Two things I've picked up:
- Godot 4 is stricter with literal types,
0is always anintand never afloat. - The player can't move when looking perfectly up or down.
Contributor
Author
There was a problem hiding this comment.
- Thanks for pointing out! I'm relatively new to GDScript, especially when it comes to the newer version (been using Godot with C# so far), so I can mess up things like that.
- I tried to figure this out but the code is pretty messy right now so I would much rather rewrite the entire class with the state pattern in mind while fixing this issue. Not sure if we should move to C# entirely at this point, as I've been trying out newer betas and it becomes more and more stable to be actually used more extensively.
rezbyte
approved these changes
Dec 20, 2022
Collaborator
rezbyte
left a comment
There was a problem hiding this comment.
Well done! 🎆
Looks good to me.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Trivial fix that prohibits doing 360 spins with the camera, removed .vscode from .gitignore and initialized a .NET project.