Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] master from godotengine:master #133

Merged
merged 91 commits into from
Jan 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
91 commits
Select commit Hold shift + click to select a range
df61dca
Change `VisualShaderNodeVec4Constant` type to vec4
Chaosus Jul 22, 2024
30a573e
Fix TODO comments in class reference
RedMser Nov 14, 2024
d471210
libpng: Update to upstream 1.6.44
akien-mga Dec 3, 2024
159d70a
Allow Viewport children to lock, group, and key
kitbdev Dec 4, 2024
d5e4d2f
tinyexr: Update to upstream 1.0.9
akien-mga Dec 4, 2024
c96d9a8
Fix missing focus outline for 2D and 3D editor viewports
Giganzo Dec 7, 2024
a6c5373
[Web] Fix `DirAccess::unlink()` not updating the IDBFS
adamscott Dec 9, 2024
7321c18
Fix DependencyRemoveDialog not handling UIDs
KoBeWi Dec 14, 2024
830f250
fix: canvas background mode not clearing correctly when using gles3 g…
Namey5 Dec 14, 2024
975369f
[.NET] Fix EmitSignal with typed array parameters
raulsntos Dec 20, 2024
d798068
[WS] Fix wslay multi-frame message parsing
Faless Dec 20, 2024
b536b3e
SCons: Don't update node count when empty
Repiteo Dec 20, 2024
b719eed
Fix last character deletion in Wayland IME input
buresu Dec 21, 2024
62c1791
Add more property hint ranges for project settings
Calinou Oct 26, 2024
e0ca8be
Re-create missing .uid files
KoBeWi Dec 24, 2024
46c23e1
Don't set Variant::Type in destructor
hpvb Dec 25, 2024
81b1138
Fix icon UIDs in Project Manager
KoBeWi Dec 21, 2024
4e48b19
Add Color.from_rgba8 and deprecate Color8
KoBeWi Dec 26, 2024
24f5361
Make transform elements BitField in RetargetModifier
TokageItLab Dec 25, 2024
c5b61d4
ProjectManager: Update project list placeholder when project created …
larspet Dec 27, 2024
e689c12
Add visualization of 3D particle emission shapes
paddy-exe Dec 4, 2024
4f7e04a
CI: Only define single concurrency
Repiteo Dec 29, 2024
1b04e6f
Respect PROPERTY_USAGE_NEVER_DUPLICATE with Make Sub-Resources Unique
KoBeWi Dec 30, 2024
47db9c0
ColorPicker: Fix cursor position in OKHSL wheel
beicause Dec 30, 2024
ba3f2bf
Fix dictionary editor steals focus when reloading script.
ajreckof Dec 30, 2024
751d3d5
Fix lightmapper penumbra computation
Geometror Dec 30, 2024
bb76e72
Respect system user setting for (un)installing APK
RedMser Dec 30, 2024
6f363b9
astcenc: Misc improvements and optimizations
BlueCube3310 Dec 27, 2024
7beaddc
Improve performance with many static/sleeping bodies when using Jolt …
mihe Dec 30, 2024
5437316
Fix Crash with `GraphNode`
Sauermann Jan 1, 2025
f2d4dac
Thread: Re-add `<new>` include for `std::hardware_destructive_interfe…
akien-mga Jan 1, 2025
8dd0579
Add NavigationLink debug direction indicator
smix8 Jan 2, 2025
d0c4219
Fix looking at with 180 degree arc
TokageItLab Jan 1, 2025
b50d9b7
Update OS.request_permission(...) description
syntaxerror247 Dec 24, 2024
3bb2309
Feature adding Windows native menu close callback
marcelovbcfilho Dec 31, 2024
cccd243
Refactor CommandQueueMT to use vararg templates
hpvb Dec 23, 2024
4184884
Make NavMeshQueries use NavRegionIteration polygons directly
smix8 Jan 2, 2025
e06d838
Style: Enforce `AllowShortFunctionsOnASingleLine`
Repiteo Dec 30, 2024
2c9620f
`clang-format` commit to `.git-blame-ignore-revs`
Repiteo Jan 2, 2025
e330b79
Fix root folder logic in the filesystem
alessand10 Dec 7, 2024
cf8376b
Add a context menu to quick open dialog
hakro Dec 21, 2024
7bed84c
Revert "Stop reporting contacts for sleeping bodies when using Jolt P…
mihe Jan 2, 2025
ec7d7ab
GLTF: Always read alphaCutoff property
aaronfranke Jan 2, 2025
e89c196
`LineEdit` add member `keep_editing_on_text_submit`.
WhalesState Jan 2, 2025
a550eef
Improve script class display in Create dialog
Lazy-Rabbit-2001 Dec 30, 2024
22f4322
Merge pull request #101004 from akien-mga/core-thread-fix-gcc12-crash
akien-mga Jan 2, 2025
0d710da
Merge pull request #98554 from Calinou/add-property-hint-ranges
akien-mga Jan 2, 2025
7ccc00d
Merge pull request #99242 from RedMser/fix-todos-in-classref
akien-mga Jan 2, 2025
442f114
Merge pull request #99994 from kitbdev/fix-editor-viewport-group-anim
akien-mga Jan 2, 2025
72839d0
Merge pull request #99996 from akien-mga/libpng-1.6.44
akien-mga Jan 2, 2025
4ef55ba
Merge pull request #99998 from akien-mga/tinyexr-1.0.9
akien-mga Jan 2, 2025
d484e23
Merge pull request #100113 from paddy-exe/particle-emission-shape-vis…
akien-mga Jan 2, 2025
3a20c3e
Merge pull request #100161 from alessand10/fix-filesystem-logic
akien-mga Jan 2, 2025
4f5982c
Merge pull request #100171 from Giganzo/editor-focus
akien-mga Jan 2, 2025
703552c
Merge pull request #100240 from WhalesState/line-edit-focus
akien-mga Jan 2, 2025
3936d11
Merge pull request #100388 from Namey5/gles3-canvas-clear-fix
akien-mga Jan 2, 2025
261f0b9
Merge pull request #100409 from KoBeWi/now_delete_uids
akien-mga Jan 2, 2025
7dd1420
Merge pull request #100631 from Faless/fix/wslay_frame_end_not_fin
akien-mga Jan 2, 2025
e13facf
Merge pull request #100679 from hakro/quick_open_context_menu
akien-mga Jan 2, 2025
35cf29b
Merge pull request #100715 from buresu/fix-wayland-ime-input
akien-mga Jan 2, 2025
386e4e1
Merge pull request #100729 from Lazy-Rabbit-2001/new_create_dialog_p1
akien-mga Jan 2, 2025
dd7d36e
Merge pull request #100770 from hpvb/command-queue-mt
akien-mga Jan 2, 2025
8be07f1
Merge pull request #100785 from syntaxerror247/request-permission-doc
akien-mga Jan 2, 2025
e9da833
Merge pull request #100795 from hpvb/optimize-variant-clear
akien-mga Jan 2, 2025
ff14d86
Merge pull request #100811 from TokageItLab/bitmask-retarget
akien-mga Jan 2, 2025
5ff6167
Merge pull request #100825 from KoBeWi/colored_eight
akien-mga Jan 2, 2025
19a7b46
Merge pull request #100848 from BlueCube3310/astc-improvements
akien-mga Jan 2, 2025
16a4919
Merge pull request #100912 from Repiteo/ci/single-concurrency
akien-mga Jan 2, 2025
d01768d
Merge pull request #100925 from KoBeWi/Stop.Duplicating.Scripts-
akien-mga Jan 2, 2025
8e76f66
Merge pull request #100929 from Geometror/fix-lm-penumbra-computation
akien-mga Jan 2, 2025
2f4cb70
Merge pull request #100930 from beicause/fix-color-picker-cursor-posi…
akien-mga Jan 2, 2025
88babbd
Merge pull request #100932 from ajreckof/Fix-dictionary-editor-steals…
akien-mga Jan 2, 2025
21e6671
Merge pull request #100937 from Repiteo/style/clang-format-sync
akien-mga Jan 2, 2025
d28c416
Merge pull request #100938 from RedMser/system-user-adb
akien-mga Jan 2, 2025
1f2d535
Merge pull request #100983 from mihe/jolt/only-iterate-active-bodies
akien-mga Jan 2, 2025
e680767
Merge pull request #100987 from marcelovbcfilho/master
akien-mga Jan 2, 2025
d47fef1
Merge pull request #100991 from TokageItLab/180deg-arc
akien-mga Jan 2, 2025
32b081b
Merge pull request #101005 from Sauermann/fix-graph-node-crash
akien-mga Jan 2, 2025
94f23c3
Merge pull request #101010 from smix8/navlink_debug_direction
akien-mga Jan 2, 2025
8e66fac
Merge pull request #101037 from smix8/navregion_polys
akien-mga Jan 2, 2025
5a8b718
Merge pull request #101044 from mihe/jolt/revert-100533
akien-mga Jan 2, 2025
efae48a
Merge pull request #100624 from Repiteo/scons/node-count-fix
akien-mga Jan 3, 2025
b34adf2
Remove unused OS `_display_driver_id` member
akien-mga Nov 11, 2024
6c6e744
Merge pull request #94616 from Chaosus/vs_fix_vec4_constant
akien-mga Jan 3, 2025
abe5ba0
Merge pull request #99071 from akien-mga/os-unused-display_driver_id
akien-mga Jan 3, 2025
89b18de
Merge pull request #100221 from adamscott/fix-diraccess-sync
akien-mga Jan 3, 2025
29bd5c0
Merge pull request #100636 from raulsntos/dotnet/emit-signal-fix
akien-mga Jan 3, 2025
a17a0bc
Merge pull request #100717 from KoBeWi/icon_uncache
akien-mga Jan 3, 2025
88a101e
Merge pull request #100787 from KoBeWi/uid_be_like_'I'm_back'
akien-mga Jan 3, 2025
c3c0c24
Merge pull request #100863 from larspet/project-list-placeholder
akien-mga Jan 3, 2025
bdf625b
Merge pull request #101051 from aaronfranke/gltf-always-read-alpha-cu…
akien-mga Jan 3, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,6 @@ b37fc1014abf7adda70dc30b0822d775b3a4433f

# Style: Apply clang-tidy fixes (superficial)
bb5f390fb9b466be35a5df7651323d7e66afca31

# Style: Enforce `AllowShortFunctionsOnASingleLine`
e06d83860d798b6766b23d6eae48557387a7db85
4 changes: 0 additions & 4 deletions .github/workflows/android_builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@ env:
GODOT_BASE_BRANCH: master
SCONSFLAGS: verbose=yes warnings=extra werror=yes debug_symbols=no module_text_server_fb_enabled=yes strict_checks=yes

concurrency:
group: ci-${{ github.actor }}-${{ github.head_ref || github.run_number }}-${{ github.ref }}-android
cancel-in-progress: true

jobs:
build-android:
runs-on: ubuntu-24.04
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/godot_cpp_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@ env:
# Used for the godot-cpp checkout.
GODOT_CPP_BRANCH: 4.3

concurrency:
group: ci-${{ github.actor }}-${{ github.head_ref || github.run_number }}-${{ github.ref }}-cpp-tests
cancel-in-progress: true

jobs:
godot-cpp-tests:
runs-on: ubuntu-24.04
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/ios_builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@ env:
GODOT_BASE_BRANCH: master
SCONSFLAGS: verbose=yes warnings=extra werror=yes debug_symbols=no module_text_server_fb_enabled=yes strict_checks=yes

concurrency:
group: ci-${{ github.actor }}-${{ github.head_ref || github.run_number }}-${{ github.ref }}-ios
cancel-in-progress: true

jobs:
ios-template:
runs-on: macos-latest
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/linux_builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@ env:
TSAN_OPTIONS: suppressions=misc/error_suppressions/tsan.txt
UBSAN_OPTIONS: suppressions=misc/error_suppressions/ubsan.txt

concurrency:
group: ci-${{ github.actor }}-${{ github.head_ref || github.run_number }}-${{ github.ref }}-linux
cancel-in-progress: true

jobs:
build-linux:
# Stay one LTS before latest to increase portability of Linux artifacts.
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/macos_builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@ env:
GODOT_BASE_BRANCH: master
SCONSFLAGS: verbose=yes warnings=extra werror=yes module_text_server_fb_enabled=yes strict_checks=yes

concurrency:
group: ci-${{ github.actor }}-${{ github.head_ref || github.run_number }}-${{ github.ref }}-macos
cancel-in-progress: true

jobs:
build-macos:
runs-on: macos-latest
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/runner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: 🔗 GHA
on: [push, pull_request, merge_group]

concurrency:
group: ci-${{ github.actor }}-${{ github.head_ref || github.run_number }}-${{ github.ref }}-runner
group: ${{ github.workflow }}|${{ github.ref_name }}
cancel-in-progress: true

jobs:
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/static_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@ name: 📊 Static Checks
on:
workflow_call:

concurrency:
group: ci-${{ github.actor }}-${{ github.head_ref || github.run_number }}-${{ github.ref }}-static
cancel-in-progress: true

jobs:
static-checks:
name: Code style, file formatting, and docs
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/web_builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@ env:
SCONSFLAGS: verbose=yes warnings=extra werror=yes debug_symbols=no use_closure_compiler=yes strict_checks=yes
EM_VERSION: 3.1.64

concurrency:
group: ci-${{ github.actor }}-${{ github.head_ref || github.run_number }}-${{ github.ref }}-web
cancel-in-progress: true

jobs:
web-template:
runs-on: ubuntu-24.04
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/windows_builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@ env:
SCONSFLAGS: verbose=yes warnings=extra werror=yes module_text_server_fb_enabled=yes d3d12=yes strict_checks=yes "angle_libs=${{ github.workspace }}/"
SCONS_CACHE_MSVC_CONFIG: true

concurrency:
group: ci-${{ github.actor }}-${{ github.head_ref || github.run_number }}-${{ github.ref }}-windows
cancel-in-progress: true

jobs:
build-windows:
# Windows 10 with latest image
Expand Down
2 changes: 1 addition & 1 deletion core/config/project_settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1578,7 +1578,7 @@ ProjectSettings::ProjectSettings() {
// installed by the scripts provided in the repository
// (check `misc/scripts/install_d3d12_sdk_windows.py`).
// For example, if the script installs 1.613.3, the default value must be 613.
GLOBAL_DEF_RST(PropertyInfo(Variant::INT, "rendering/rendering_device/d3d12/agility_sdk_version"), 613);
GLOBAL_DEF_RST(PropertyInfo(Variant::INT, "rendering/rendering_device/d3d12/agility_sdk_version", PROPERTY_HINT_RANGE, "0,10000,1,or_greater,hide_slider"), 613);

GLOBAL_DEF_BASIC(PropertyInfo(Variant::INT, "rendering/textures/canvas_textures/default_texture_filter", PROPERTY_HINT_ENUM, "Nearest,Linear,Linear Mipmap,Nearest Mipmap"), 1);
GLOBAL_DEF_BASIC(PropertyInfo(Variant::INT, "rendering/textures/canvas_textures/default_texture_repeat", PROPERTY_HINT_ENUM, "Disable,Enable,Mirror"), 0);
Expand Down
14 changes: 9 additions & 5 deletions core/io/resource.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,15 @@

class Node;

#define RES_BASE_EXTENSION(m_ext) \
public: \
static void register_custom_data_to_otdb() { ClassDB::add_resource_base_extension(m_ext, get_class_static()); } \
virtual String get_base_extension() const override { return m_ext; } \
\
#define RES_BASE_EXTENSION(m_ext) \
public: \
static void register_custom_data_to_otdb() { \
ClassDB::add_resource_base_extension(m_ext, get_class_static()); \
} \
virtual String get_base_extension() const override { \
return m_ext; \
} \
\
private:

class Resource : public RefCounted {
Expand Down
23 changes: 21 additions & 2 deletions core/io/resource_uid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ Error ResourceUID::load_from_cache(bool p_reset) {
int32_t len = f->get_32();
Cache c;
c.cs.resize(len + 1);
ERR_FAIL_COND_V(c.cs.size() != len + 1, ERR_FILE_CORRUPT); // out of memory
ERR_FAIL_COND_V(c.cs.size() != len + 1, ERR_FILE_CORRUPT); // Out of memory.
c.cs[len] = 0;
int32_t rl = f->get_buffer((uint8_t *)c.cs.ptrw(), len);
ERR_FAIL_COND_V(rl != len, ERR_FILE_CORRUPT);
Expand Down Expand Up @@ -257,7 +257,7 @@ Error ResourceUID::update_cache() {
for (KeyValue<ID, Cache> &E : unique_ids) {
if (!E.value.saved_to_cache) {
if (f.is_null()) {
f = FileAccess::open(get_cache_file(), FileAccess::READ_WRITE); //append
f = FileAccess::open(get_cache_file(), FileAccess::READ_WRITE); // Append.
if (f.is_null()) {
return ERR_CANT_OPEN;
}
Expand All @@ -282,6 +282,25 @@ Error ResourceUID::update_cache() {
return OK;
}

String ResourceUID::get_path_from_cache(Ref<FileAccess> &p_cache_file, const String &p_uid_string) {
const uint32_t entry_count = p_cache_file->get_32();
CharString cs;
for (uint32_t i = 0; i < entry_count; i++) {
int64_t id = p_cache_file->get_64();
int32_t len = p_cache_file->get_32();
cs.resize(len + 1);
ERR_FAIL_COND_V(cs.size() != len + 1, String());
cs[len] = 0;
int32_t rl = p_cache_file->get_buffer((uint8_t *)cs.ptrw(), len);
ERR_FAIL_COND_V(rl != len, String());

if (singleton->id_to_text(id) == p_uid_string) {
return String(cs);
}
}
return String();
}

void ResourceUID::clear() {
cache_entries = 0;
unique_ids.clear();
Expand Down
3 changes: 3 additions & 0 deletions core/io/resource_uid.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@
#include "core/string/string_name.h"
#include "core/templates/hash_map.h"

class FileAccess;

class ResourceUID : public Object {
GDCLASS(ResourceUID, Object)
public:
Expand Down Expand Up @@ -78,6 +80,7 @@ class ResourceUID : public Object {
Error load_from_cache(bool p_reset);
Error save_to_cache();
Error update_cache();
static String get_path_from_cache(Ref<FileAccess> &p_cache_file, const String &p_uid_string);

void clear();

Expand Down
7 changes: 4 additions & 3 deletions core/math/basis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1049,9 +1049,10 @@ Basis Basis::looking_at(const Vector3 &p_target, const Vector3 &p_up, bool p_use
v_z = -v_z;
}
Vector3 v_x = p_up.cross(v_z);
#ifdef MATH_CHECKS
ERR_FAIL_COND_V_MSG(v_x.is_zero_approx(), Basis(), "The target vector and up vector can't be parallel to each other.");
#endif
if (v_x.is_zero_approx()) {
WARN_PRINT("Target and up vectors are colinear. This is not advised as it may cause unwanted rotation around local Z axis.");
v_x = p_up.get_any_perpendicular(); // Vectors are almost parallel.
}
v_x.normalize();
Vector3 v_y = v_z.cross(v_x);

Expand Down
4 changes: 4 additions & 0 deletions core/math/color.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -482,6 +482,10 @@ Color Color::from_rgbe9995(uint32_t p_rgbe) {
return Color(rd, gd, bd, 1.0f);
}

Color Color::from_rgba8(int64_t p_r8, int64_t p_g8, int64_t p_b8, int64_t p_a8) {
return Color(p_r8 / 255.0f, p_g8 / 255.0f, p_b8 / 255.0f, p_a8 / 255.0f);
}

Color::operator String() const {
return "(" + String::num(r, 4) + ", " + String::num(g, 4) + ", " + String::num(b, 4) + ", " + String::num(a, 4) + ")";
}
Expand Down
1 change: 1 addition & 0 deletions core/math/color.h
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@ struct [[nodiscard]] Color {
static Color from_hsv(float p_h, float p_s, float p_v, float p_alpha = 1.0f);
static Color from_ok_hsl(float p_h, float p_s, float p_l, float p_alpha = 1.0f);
static Color from_rgbe9995(uint32_t p_rgbe);
static Color from_rgba8(int64_t p_r8, int64_t p_g8, int64_t p_b8, int64_t p_a8 = 255);

_FORCE_INLINE_ bool operator<(const Color &p_color) const; // Used in set keys.
operator String() const;
Expand Down
11 changes: 6 additions & 5 deletions core/math/quaternion.h
Original file line number Diff line number Diff line change
Expand Up @@ -142,14 +142,15 @@ struct [[nodiscard]] Quaternion {

Quaternion(const Vector3 &p_v0, const Vector3 &p_v1) { // Shortest arc.
Vector3 c = p_v0.cross(p_v1);
real_t d = p_v0.dot(p_v1);

if (d < -1.0f + (real_t)CMP_EPSILON) {
x = 0;
y = 1;
z = 0;
if (c.is_zero_approx()) {
Vector3 axis = p_v0.get_any_perpendicular();
x = axis.x;
y = axis.y;
z = axis.z;
w = 0;
} else {
real_t d = p_v0.dot(p_v1);
real_t s = Math::sqrt((1.0f + d) * 2.0f);
real_t rs = 1.0f / s;

Expand Down
11 changes: 11 additions & 0 deletions core/math/vector3.h
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ struct [[nodiscard]] Vector3 {
_FORCE_INLINE_ Vector3 cross(const Vector3 &p_with) const;
_FORCE_INLINE_ real_t dot(const Vector3 &p_with) const;
Basis outer(const Vector3 &p_with) const;
_FORCE_INLINE_ Vector3 get_any_perpendicular() const;

_FORCE_INLINE_ Vector3 abs() const;
_FORCE_INLINE_ Vector3 floor() const;
Expand Down Expand Up @@ -326,6 +327,16 @@ Vector3 Vector3::direction_to(const Vector3 &p_to) const {
return ret;
}

Vector3 Vector3::get_any_perpendicular() const {
// Return the any perpendicular vector by cross product with the Vector3.RIGHT or Vector3.UP,
// whichever has the greater angle to the current vector with the sign of each element positive.
// The only essence is "to avoid being parallel to the current vector", and there is no mathematical basis for using Vector3.RIGHT and Vector3.UP,
// since it could be a different vector depending on the prior branching code Math::abs(x) <= Math::abs(y) && Math::abs(x) <= Math::abs(z).
// However, it would be reasonable to use any of the axes of the basis, as it is simpler to calculate.
ERR_FAIL_COND_V_MSG(is_zero_approx(), Vector3(0, 0, 0), "The Vector3 must not be zero.");
return cross((Math::abs(x) <= Math::abs(y) && Math::abs(x) <= Math::abs(z)) ? Vector3(1, 0, 0) : Vector3(0, 1, 0)).normalized();
}

/* Operators */

Vector3 &Vector3::operator+=(const Vector3 &p_v) {
Expand Down
Loading