stoofin
577b6d1196
Fixed bug caused by a copy/paste error in Face3::get_closest_point_to
...
s * edge0 = -d / a * edge0 = -edge0⋅v0 / (edge0⋅edge0) * edge0 = vector projection of -v0 onto edge0
By incorrectly using -e/c instead of -d/a, Face3::get_closest_point_to was returning the wrong point in certain cases. Specifically, I noticed it returning vertex[0] when it should have been returning vertex[1].
(cherry picked from commit 8abd64dcbb
)
2019-11-29 16:04:41 +01:00
Toshiwo
656f23fde9
when doing Vector3 slerp it is not necessary to have it normalized.
...
(cherry picked from commit 3aff645114
)
2019-11-12 13:09:35 +01:00
Toshiwo
b56fa43090
Fix Vector3 slerp method normalizing cross product
...
(cherry picked from commit 416a7d06de
)
2019-11-12 13:09:35 +01:00
Christoph Schroeder
0f1704c9e8
Fixes Geometry.segment_intersects_circle working only one way.
...
(cherry picked from commit dcbe55a1fa
)
2019-11-12 11:04:27 +01:00
Michael Alexsander Silva Dias
eef5dc98fa
Update some dead links in the codebase
...
(cherry picked from commit 12ae7a4c02
)
2019-07-29 17:47:46 +02:00
Juan Linietsky
0064d26517
Some improvements to is_equal_approx, restored Quat operator.
...
(cherry picked from commit dee98d3b6d
)
2019-04-20 23:52:19 +02:00
Juan Linietsky
c76c33fb50
Added generator audio stream, and spectrum analyzer audio effect
...
Made AudioFrame and Vector2 equivalent for casting.
Added ability to obtain the playback object from stream players.
Added ability to obtain effect instance from audio server.
(cherry picked from commit e33764744c
)
2019-04-20 23:50:19 +02:00
Chaosus
71753edeae
Added normally distributed generation function to RNG
...
(cherry picked from commit 5f137925dc
)
2019-04-20 23:39:04 +02:00
Chaosus
6ab01490f5
Added smoothstep built-in function
...
(cherry picked from commit 514a3fb96a
)
2019-04-20 23:30:56 +02:00
Chaosus
340bf6e80c
Added direction_to method to vectors
...
(cherry picked from commit 55f3bd97a2
)
2019-04-20 23:24:35 +02:00
Chaosus
9535a6079e
Added functions to AStar for disable/enable points
...
(cherry picked from commit cc71fb2308
)
2019-04-20 23:21:06 +02:00
Fabio Alessandrelli
e0fe795433
Add object encoding param to serialization methods
...
Network peers get_var/put_var
File get_var/store_var
GDScript/Mono/VisualScript bytes2var/var2bytes
Add MultiplayerAPI.allow_object_decoding member which deprecates PacketPeer.allow_object_decoding.
Break ABI compatibaility (API compatibility for GDNative).
(cherry picked from commit 393e62b98a
)
2019-04-20 23:15:02 +02:00
marxin
c33a924c28
Fix new GCC 9 warnings: -Wdeprecated-copy.
...
(cherry picked from commit 6be77da7eb
)
2019-04-20 22:04:25 +02:00
Rémi Verschelde
b5d9099626
Revert "Properly setup seed in RNG"
...
This reverts commit 1dd72dca45
.
As pointed out in #27171 , it would break compatibility with 3.1.0.
2019-04-09 09:36:31 +02:00
Chaosus
1dd72dca45
Properly setup seed in RNG
...
(cherry picked from commit 6280be46a6
)
2019-04-03 16:53:30 +02:00
Rémi Verschelde
bce56cf337
Fix -Wc++11-extensions warning after #26737
...
Fixes #26769 .
2019-03-07 22:48:00 +01:00
MidZik
4eccb58bc5
Fixed get_seed() not returning the correct seed.
2019-03-07 02:45:18 -06:00
Mariano Suligoy
078b869d9a
TileSet/TileMap: Decompose solid non-convex polygons into convexes. Real fix for #24003
2019-03-04 21:03:10 -03:00
Hein-Pieter van Braam
33c6b0ec1a
Scale quickhull tolerance with mesh size
...
Taken from three.js's implementation. Tested with a wide variety of
meshes.
2019-03-01 20:58:39 +00:00
Juan Linietsky
3299045988
Remove setting that caused is_inside_tree() errors on doppler tracking enabled.
2019-02-26 09:16:23 -03:00
Juan Linietsky
a32b26dfa2
Several fixes to make GLES2 on HTML5 work much better.
...
Changed math class error reporting to be a bit less paranoid.
2019-02-25 21:47:29 -03:00
Chaosus
bc4d781277
Fix wrapi to use int64_t instead int
2019-02-25 10:51:04 +03:00
Hugo Locurcio
18b90508a1
Fix crash when using `wrapi()` with a range of zero
...
`wrapi()` and `wrapf()` will now return the value of
the `min` parameter if the range is equal to zero.
2019-02-23 16:16:32 +01:00
marxin
8d51618949
Add -Wshadow=local to warnings and fix reported issues.
...
Fixes #25316 .
2019-02-20 19:44:12 +01:00
hedin
c496781bf6
fixed AStar improper point deletion (leads to crash)
2019-02-20 17:24:58 +01:00
Rémi Verschelde
f6fcbcfe9e
Merge pull request #25680 from Chaosus/random_fix
...
Fix random generation, to not always retrieve 0 after seed()
2019-02-16 23:24:02 +01:00
Pierrick Brunet
3b6d05db3e
Fix typo for randd and randf
...
* And improve documentation according to issue #25938
2019-02-16 21:05:18 +01:00
Rémi Verschelde
55ca2a7c88
Merge pull request #25821 from akien-mga/sync-class-and-filenames
...
Ensure classes match their header filename
2019-02-13 08:49:39 +01:00
Aaron Franke
06df7b0963
[Core] Transform2D add set_scale and fix set_rotation
...
Note: These are still not exposed to GDScript
2019-02-12 17:59:29 -05:00
Rémi Verschelde
b7cc2bb1e2
Core: Ensure classes match their header filename
...
Also drop some unused files.
Renamed:
- `core/dvector.h` -> `pool_vector.h`
- `core/io/resource_import.h` -> `resource_importer.h`
- `core/sort.h` -> `sort_array.h`
- `core/string_db.h` -> `string_name.h`
Dropped:
- `core/allocators.h`
- `core/os/shell.h`
- `core/variant_construct_string.cpp`
2019-02-12 13:34:25 +01:00
Chaosus
f946b28f75
Fix random generation, to not retrieve 0 after seed()
2019-02-10 14:16:02 +03:00
Aaron Franke
3f837d5cc5
[Core] Rename Matrix3 file to Basis
...
The code already referred to "Basis", it's just the file name that was different for some reason.
2019-02-09 14:42:23 -05:00
Bojidar Marinov
e34a4c63a7
Fix AStar crashing with large (>1e30) estimated values
...
Fixes #21601
2019-01-30 20:22:08 +02:00
Rémi Verschelde
a0581cca1f
Revert "Revert "Update random_pcg.h""
...
This reverts commit 6f704c338a
.
Sorry about this, this was a test and not meant to be pushed to master. :/
2019-01-23 10:36:36 +01:00
Rémi Verschelde
6f704c338a
Revert "Update random_pcg.h"
...
This reverts commit 64e584a97e
.
2019-01-23 10:30:18 +01:00
Leon Krause
35466475fe
Fix HTML5 build warning
2019-01-20 00:12:50 +01:00
Rémi Verschelde
9ddf1115bc
Revert "fixed invalid implementation of Plane::intersects_segment and Plane::intersects_ray"
2019-01-13 11:06:34 +01:00
Evgeny Savelyev
2c36078be4
fixed invalid implementations of Plane::intersects_segment and Plane::intersects_ray
2019-01-12 00:38:16 +03:00
Juan Linietsky
e46f28e02d
Removed splits in Polygon editor, replace by internal vertices and polygon support.
2019-01-08 19:11:08 -03:00
Calamander
64e584a97e
Update random_pcg.h
...
little fix to function types
2019-01-07 23:13:16 +01:00
Rémi Verschelde
b16c309f82
Update copyright statements to 2019
...
Happy new year to the wonderful Godot community!
2019-01-01 12:58:10 +01:00
Rémi Verschelde
a1954e51e8
Merge pull request #24135 from Chaosus/rng
...
Added ranged integer generation function to RNG class
2018-12-12 14:07:47 +01:00
Wilson E. Alvarez
08f22f1cf0
Moved member variables to initializer list
2018-12-11 18:33:01 -05:00
Chaosus
d376be2bf4
Added integer number generation function to RNG class
2018-12-06 14:49:52 +03:00
Rémi Verschelde
173b342ca7
Remove trailing whitespace
...
With `sed -i $(rg -l '[[:blank:]]*$' -g'!thirdparty') -e 's/[[:blank:]]*$//g'`
(+ manual revert of some thirdparty code under `platform/android`).
2018-11-20 11:15:02 +01:00
Juan Linietsky
16022da187
Ensure that array passed to physics is always counter clockwise, fixes #15361 .
2018-11-14 15:55:50 -03:00
Chaosus
f8151a9e50
Implement random number generator
...
Co-authored-by: Zirak <zirakertan@gmail.com>
2018-11-13 10:50:07 +03:00
Aaron Franke
81be9542eb
Remove unused "dtoll" methods
...
These methods aren't used anywhere in Godot's code, and all they do is cast floating types to int64_t. There's no reason to have these lines, they literally do nothing, and they aren't useful functions to begin with.
2018-11-02 05:02:27 -04:00
santouits
b0df0b46ac
Error running Expression.execute after parse error
...
There happens a segmentation fault when you use Expression.parse() and you don't check for errors and then run Expression.execute(). So we check if there was a parse error in the execute method now.
2018-10-28 12:13:39 +02:00
Rémi Verschelde
bf6dcb9105
Merge pull request #22722 from akien-mga/fix-warnings
...
Fix more "may be used initialized" warnings from GCC 7
2018-10-07 11:07:13 +02:00