Commit graph

982 commits

Author SHA1 Message Date
Duroxxigar
a726d011d5
Made toplevel a property for Node3D and CanvasItem
(cherry picked from commit 85a8dbb7b6)
2020-10-01 16:00:47 +02:00
Rémi Verschelde
e40b4eeeea
Merge pull request #37226 from arrowinaknee/fix-node-config-warnings
[3.2] Update get_configuration_warning() overrides to retrieve warnings from parent class
2020-10-01 14:04:26 +02:00
clayjohn
b730c5596c Restore default alpha_scissor_threshold to Sprite3D 2020-09-27 22:54:50 -07:00
Jonathan Vice
96ca267209
Reorder sprite h_frames & v_frames
(cherry picked from commit 28326aec60)
2020-09-24 14:43:10 +02:00
booer
bf9090c23f
Fixes updating CPUParticles emmision shape values
(cherry picked from commit 113921b56c)
2020-09-24 14:43:08 +02:00
Hugo Locurcio
369e5a7f35
Mark InterpolatedCamera as deprecated
InterpolatedCamera has already been removed from the `master` branch.
This adds a deprecation notice to inform people about the upcoming removal
in Godot 4.0.

Its functionality could be replicated in a GDScript add-on with relative
ease.
2020-09-16 15:36:40 +02:00
clayjohn
a4f2fea2ae Fix axis bug regression in Sprite3D 2020-09-15 08:02:19 -07:00
PouleyKetchoupp
d82cc621e1
Fix 2D Particle velocity with directed emission mask
Changed CPU velocity calculation for EMISSION_SHAPE_DIRECTED_POINTS
to follow the same logic as in the GPU version:
mat2 rotm;
rotm[0] = texelFetch(emission_texture_normal, emission_tex_ofs, 0).xy;
rotm[1] = rotm[0].yx * vec2(1.0, -1.0);
VELOCITY.xy = rotm * VELOCITY.xy;

Now both CPUParticles2D & CPUParticles3D (z disabled) show the same results
as their GPU counterparts and take the initial velocity settings into account.

(cherry picked from commit 1c231cacb3)
2020-08-21 02:28:19 +02:00
clayjohn
d33a9aaacb Check for uncompressed uvs in Sprite3D 2020-08-16 19:19:14 -07:00
Rémi Verschelde
7b4b83e9dc
Merge pull request #39817 from yrk06/ExposeInertiaTensor
Added Rigid Body Method "get_inverse_inertia_tensor"
2020-07-21 16:50:56 +02:00
clayjohn
fb4e55bb7a Pass Sprite3D AABBs to VisualServer 2020-07-20 20:22:12 -07:00
Yerik
d09b16512b Added Method get_inverse_inertia_tensor 2020-07-19 13:51:32 -03:00
Juan Linietsky
ceeb690476 Properly pass safe margin on initialization.
Fixes jitter.

(cherry picked from commit 13e0385702)
2020-07-15 12:48:18 +02:00
ArrowInAKnee
e48430b1d4 Make all get_configuration_warning() overrides retrieve warnings from parent 2020-07-13 01:50:02 +03:00
Maganty Rushyendra
76a43c93cd Fix repeated updates of PathFollow3D Transform
Add optional parameter to specify whether applying rotation to the
PathFollow3D's Transform is necessary, preventing erroneous updates.

(cherry picked from commit be3a1769fe)
2020-07-10 10:59:24 +02:00
Rémi Verschelde
1f886d1f31
Merge pull request #39867 from clayjohn/Sprite3D-mesh
Use mesh instead of immediate for drawing Sprite3D
2020-07-06 16:36:27 +02:00
clayjohn
6c0ff26f35 Use mesh instead of immediate for drawing Sprite3D 2020-07-03 12:19:26 -06:00
Adam Reichold
f06fc1fdf4 Call Spatial::get_global_transform and Vector3::dot only once within Camera::is_position_behind to avoid redundant work.
(cherry picked from commit b2a204799a)
2020-06-29 10:48:45 +02:00
Marcel Admiraal
b006f5402d Check for motion in cast_motion() before doing Bullet convexSweepTest().
Also ensure that default closest_safe and closest_unsafe values are
defined in cast_motion() and before cast_motion() is called.
2020-06-21 16:28:01 +01:00
Marcel Admiraal
ea4ee986b5 Normalise p_up_direction vector in move_and_slide() and
move_and_slide_with_snap() and fix tolerance in
move_and_slide_with_snap() max floor angle.
2020-06-16 10:11:54 +01:00
Rémi Verschelde
7bf9787921 SCons: Format buildsystem files with psf/black
Configured for a max line length of 120 characters.

psf/black is very opinionated and purposely doesn't leave much room for
configuration. The output is mostly OK so that should be fine for us,
but some things worth noting:

- Manually wrapped strings will be reflowed, so by using a line length
  of 120 for the sake of preserving readability for our long command
  calls, it also means that some manually wrapped strings are back on
  the same line and should be manually merged again.

- Code generators using string concatenation extensively look awful,
  since black puts each operand on a single line. We need to refactor
  these generators to use more pythonic string formatting, for which
  many options are available (`%`, `format` or f-strings).

- CI checks and a pre-commit hook will be added to ensure that future
  buildsystem changes are well-formatted.

(cherry picked from commit cd4e46ee65)
2020-06-10 15:30:52 +02:00
Hugo Locurcio
61da4882aa Add performance hints to the DirectionalLight shadow mode property hint
This also clarifies some parts in the DirectionalLight documentation.

(cherry picked from commit b46756c723)
2020-06-04 12:16:39 +02:00
Marcel Admiraal
dac3504cc3 Fix C4724: potential mod by 0 warnings. 2020-05-21 11:28:01 +01:00
Rémi Verschelde
f390749439 Fix Visual Studio C4724 warning (potential mod by 0) 2020-05-19 11:09:28 +02:00
hoontee
159992f663 Fix bug with AudioStreamPlayer3D audio position
Applies 0c78a58b64 to `AudioStreamPlayer3D::play`.

(cherry picked from commit 330bd686ab)
2020-05-07 13:37:06 +02:00
Bastiaan Olij
02b1a5de47 Added missing spring enums for generic_6dof_joint
(cherry picked from commit 45d1f41837)
2020-05-04 16:10:22 +02:00
jitspoe
e0be022b1e Fix custom w component being uninitialized on CPU particles.
(cherry picked from commit 38085f2f6982c491935a434bb45e358dbebe1714)
(cherry picked from commit b9c280b73ff6a13ea490d2da0f2728bcef3038dc)
(cherry picked from commit 895ed2aed7)
2020-05-04 16:10:22 +02:00
Andrea Catania
b7dace75c7 Make softbody completelly stiff to attachment point
(cherry picked from commit ca7ee56759)
2020-05-01 10:56:57 +02:00
Andrea Catania
4a6f2b8af6 Activate Physics Process in SpringArm3D.
(cherry picked from commit 152303bf51)
2020-04-20 11:51:30 +02:00
Marcel Admiraal
103278d84b Run SpringArm3D's process within physics.
(cherry picked from commit 188bb6f867)
2020-04-16 12:57:22 +02:00
MickeMakaron
e3ca6d87ad Handle huge offset values in Path2D and Path3D set_offset
(cherry picked from commit 2edb59ec88)
2020-04-16 11:45:40 +02:00
Waridley
219ce2f149 Fix volume interpolation in positional audio nodes
Fixes #22016

(cherry picked from commit ff1fbd2bc5)
2020-04-16 11:43:58 +02:00
Andrea Catania
a51e78528f Fixed IK rotation issue
(cherry picked from commit 277696d6c5)
2020-04-16 11:42:07 +02:00
Tomasz Chabora
8fd7efef84 Fix visibility enabler flag toggling
(cherry picked from commit 2ccd1a7805)
2020-03-25 11:38:53 +01:00
Pierre Caye
5062d7499f Add a new configuration warning to CollisionShape
In the case where a ConcavePolygonShape is used as a shape for a RigidBody
in another mode than static, a configuration warning will appear in the
editor.

(cherry picked from commit ad227d9a85)
2020-03-06 23:51:26 +01:00
Juan Linietsky
03c8e12d54 Add support for named binds in Skin.
Helps better reutilization of skeletons from Maya exported files.

(cherry picked from commit 9a34f39d32)
2020-03-04 12:40:14 +01:00
Rémi Verschelde
416cd715a3
Merge pull request #36236 from Janglee123/vehicle-random-force-fix
Fixing Vehicle-Wheels getting a random engine_force at start
2020-03-02 16:50:10 +01:00
WARIO-MDMA
707d1a38ec Reduce AudioStreamPlayer's pitch_scale max value
(cherry picked from commit 61d20b1f56)
2020-02-18 14:19:51 +01:00
janglee
5948530332 Fixed random force on vehicle wheel 2020-02-15 20:30:17 +05:30
Haoyu Qiu
df3fad11fd Fixes crash in Spatial::notification 2020-01-25 13:16:51 +08:00
Tomasz Chabora
9ad7fc3405 Allow greater values in unit_offset 2020-01-24 14:40:33 +01:00
Rémi Verschelde
37897dba80
Merge pull request #35406 from lawnjelly/ortho-shadow
Replace CameraMatrix::get_viewport_size with get_viewport_half_extents, shadow culling with ortho camera and other affected issues
2020-01-22 22:02:09 +01:00
lawnjelly
eaf8e5ce52 Change CameraMatrix::get_viewport_size to get_viewport_half_extents
Fixes #26637.
Fixes #19900.

The viewport_size returned by get_viewport_size was previously incorrect, being half the correct value. The function is renamed to get_viewport_half_extents, and now returns a Vector2.

Code which called this function has also been modified accordingly.

This PR also fixes shadow culling when using ortho cameras, because the correct input for CameraMatrix::set_orthogonal should be the full HEIGHT from get_viewport_half_extents, and not half the width.

It also fixes state.ubo_data.viewport_size in rasterizer_scene_gles3.cpp to be the width and the height of the viewport in pixels as stated in the documentation, rather than the current value which is half the viewport extents in worldspace, presumed to be a bug.
2020-01-22 18:22:00 +00:00
Bastiaan Olij
5cf9f4faeb Incorrect joystick id was returned on an inactive ARVR controller 2020-01-22 18:27:32 +11:00
Rémi Verschelde
4faaf6089a Remove unused #if 0'ed code 2020-01-21 21:41:54 +01:00
Rémi Verschelde
1de633205f Validate input in (CPU)Particles set_emission_shape()
Fixes #29777.

Co-authored-by: Cameron Reikes <cameronreikes@gmail.com>
2020-01-16 11:08:51 +01:00
Marcel Admiraal
907adb37ce Fixes get_floor_normal() returning the user defined floor_normal.
When there is no collision with a floor the get_floor_normal() function
should return the zero vector to be consistent with get_floor_velocity().

Renames floor_normal to up_direction in all bindings.

Updates the documentation of get_floor_normal() and get_floor_velocity()
to make it clear when the values are valid. Updates the documentation for
move_and_slide() and move_and_slide_with_snap() to use the new up_direction
parameter name.
2020-01-15 10:13:35 +01:00
Andrea Catania
9f1f4620e0 Added function to expose floor normal, useful to correctly calculate player velocity.
This work has been kindly sponsored by IMVU.
2020-01-10 14:58:19 +01:00
Ben Hickling
fdd7cfa820 fixed camera project_position function that was still using the near parameter in a few calculations 2020-01-09 14:34:31 +00:00
Marcel Admiraal
fc1f0d76e7 Don't update the floor_velocity with the current linear_velocity.
Updating the floor velocity with the body's current linear velocity
discards the velocity component provided by the body's angular
rotation. Without the current contact point there is no way to calculate
the current velocity component provided by the body's angular rotation
therefore we need to use the velocity calculated at the time of the
collision.

Fixes #34807.
2020-01-05 17:35:49 +01:00