Commit Graph

87 Commits

Author SHA1 Message Date
Brian Semrau
2b7327e014 Fix Line2D UVs when using BOX end cap mode 2023-03-12 12:45:31 +01:00
15bf4aefd0 Ported: Rework how current Camera2D is determined
7e2a8afb57
- KoBeWi
and
Fix Camera2D crashes
724d6581d6
- KoBeWi
From godot4.
Also fixed issues with active Camera2D switching.
2023-03-04 21:29:49 +01:00
Hugo Locurcio
04338a5018 Tweak particles animation offset property hint to allow more precise values 2023-01-16 13:47:55 +01:00
2cd4e4d828 Renamed Set to RBSet. 2023-01-15 19:42:08 +01:00
1b0aac6028 Renamed Map to RBMap. 2023-01-15 19:12:50 +01:00
213f393293 Fix typos with codespell. 2022-12-22 19:51:25 +01:00
ce5e82d910 Ported: Include the follow-viewport-transform into CanvasLayer transform calculations
The follow-viewport-transform was missing from several calculations
3.x version of #59682
- Sauermann
608cbd8296
2022-12-22 19:06:10 +01:00
8aa456b4c4 Ported: Add Vector2/3 linking to more properties
- Camera2D.zoom
- CanvasLayer.scale
- ParallaxBackground.scroll_base_scale
- ParallaxLayer.motion_scale
- Polygon2D.texture_scale
- SpatialMaterial.uv1_scale
- SpatialMaterial.uv2_scale
- fire-forge and timothyqiu
0d602ce881
2022-12-22 18:52:47 +01:00
b8009c85f4 Ported: Add vector value linking - KoBeWi and timothyqiu
9499ebecee
2022-12-22 18:50:17 +01:00
Haoyu Qiu
1d2a560819 Make NavigationAgent target_location a property 2022-12-22 14:42:05 +01:00
smix8
9225e78f68 Fix Navigation agent callback wild pointer crash
Fixes crash in sanitizer builds when callback agent or object are already freed.

(cherry picked from commit 194c1c44e0a20faa4463e3a41bb12cf93a71fc03)
2022-12-22 14:12:00 +01:00
Wilson E. Alvarez
f7d04cc052 Avoid compiling Editor checks in release builds for VisibilityNotifier2D 2022-12-22 14:00:42 +01:00
smix8
4a9c859c6d Add detail to NavigationPolygon outline error msg
Adds additional information to the error msg when the convex partition fails due to invalid outline arrays.

(cherry picked from commit f30ebacbe851bd207e1c55e82d04caf150a59690)
2022-12-12 12:13:36 +01:00
Hugo Locurcio
7d1abdb3db Fix BackBufferCopy rect property appearing when not relevant in inspector
The `rect` property is only effective if `copy_mode` is Rect.
2022-12-11 19:18:17 +01:00
kobewi
43cb6e940a Remove error condition from get_global_transform()
(cherry picked from commit 2ff676a696a9cc1d77c0a8f4d5f31de8c7b5bc1a)
2022-12-11 19:02:12 +01:00
Hugo Locurcio
cbcd6bad4a Improve collision exception error messages for easier understanding 2022-11-30 14:37:35 +01:00
kleonc
d7ddaf619a Add ShapeCast2D/3D::get_collider_rid method 2022-11-13 00:50:18 +01:00
Sam Briels
799a6e334f fix: emit target_reached signal after updating state 2022-11-13 00:41:37 +01:00
Haoyu Qiu
dbd2b16a35 Fix NavigationObstacle not registering to default navigation map 2022-10-08 17:04:14 +02:00
kobewi
903c9932e5 Don't store frame of playing AnimatedSprite 2022-10-08 16:33:38 +02:00
67b7c1689f Fix compile. 2022-10-08 16:15:55 +02:00
lawnjelly
cd68b6e1e2 CPUParticles initialize data on set_amount
Fills particle data with zeroes on resize using set_amount(), to prevent garbage data including Nans being sent to VisualServer, which can corrupt the spatial partitioning.
2022-10-08 16:13:50 +02:00
lawnjelly
dae57cd077 Low priority redraw request for AnimatedSprite
Prevents animated sprite from creating continuous redraws in vital_redraws_only mode.
2022-09-17 00:05:36 +02:00
b6dc768e74 Fix build. 2022-09-16 19:47:02 +02:00
Marcin Nowak
a697c239b8 Backport panning strength parameters from 4.0 2022-09-16 19:44:55 +02:00
Yuri Sizov
494dc2f957 Backport fixes to documentation for paths, curves and navigation servers 2022-09-16 13:07:20 +02:00
9b3714a274 Now CanvasItems work with World overrides aswell. 2022-08-30 01:40:03 +02:00
24a1580dbf Renamed the files aswell. 2022-08-29 17:33:10 +02:00
b9f3d3b26a Moved Skeleton2D and it's related classes into a module. 2022-08-28 13:57:25 +02:00
a1865fd1af Now Camera2Ds handle being current properly, and also more intuituvely. 2022-08-24 18:11:10 +02:00
e2d42db711 Also renamed the files. 2022-08-19 21:24:36 +02:00
cffe742085 Renamed the VisualServer to RenderringServer like in Godot4, as I think it's a lot better name for it. I did not yet rename the files. 2022-08-19 20:50:20 +02:00
0438da9841 Ported: [3.x] Add ShapeCast and ShapeCast2D nodes - PrecisionRender
47a62e28ac
2022-08-19 03:12:32 +02:00
45c65911b5 Ported: Allow negative scale in Particles and CPUParticles
This can be used to make 2D particles look more 3D-y with thoughtful use
of scale curve animation.
- Calinou
c4a3560884
2022-08-19 02:42:33 +02:00
521934ff55 Ported from Godot4: New and improved IK system for Skeleton2D
This PR and commit adds a new IK system for 2D with the Skeleton2D node
that adds several new IK solvers, a way to control bones in a Skeleton2D
node similar to that in Skeleton3D. It also adds additional changes
and functionality.
This work was sponsored by GSoC 2020 and TwistedTwigleg.
Full list of changes:
* Adds a SkeletonModifier2D resource
  * This resource is the base where all IK code is written and executed
  * Has a function for clamping angles, since it is so commonly used
  * Modifiers are unique when duplicated so it works with instancing
* Adds a SkeletonModifierStack2D resource
  * This resource manages a series of SkeletonModification2Ds
  * This is what the Skeleton2D directly interfaces with to make IK possible
* Adds SkeletonModifier2D resources for LookAt, CCDIK, FABRIK, Jiggle, and TwoBoneIK
  * Each modification is in its own file
  * There is also a SkeletonModifier2D resource that acts as a stack for using multiple stacks together
* Adds a PhysicalBone2D node
  * Works similar to the PhysicalBone3D node, but uses a RigidBody2D node
* Changes to Skeleton2D listed below:
  * Skeleton2D now holds a single SkeletonModificationStack2D for IK
  * Skeleton2D now has a local_pose_override, which overrides the Bone2D position similar to how the overrides work in Skeleton3D
* Changes to Bone2D listed below:
  * The default_length property has been changed to length. Length is the length of the bone to its child bone node
  * New bone_angle property, which is the angle the bone has to its first child bone node
  * Bone2D caches its transform when not modified by IK for IK interpolation purposes
  * Bone2D draws its own editor gizmo, though this is stated to change in the future
* Changes to CanvasItemEditor listed below:
  * Bone2D gizmo drawing code removed
  * The 2D IK code is removed. Now Bone2D is the only bone system for 2D
* Transform2D now has a looking_at function for rotating to face a position
* Two new node notifications: NOTIFICATION_EDITOR_PRE_SAVE and NOTIFICATION_EDITOR_POST_SAVE
  * These notifications only are called in the editor right before and after saving a scene
  * Needed for not saving the IK position when executing IK in the editor
* Documentation for all the changes listed above.
- TwistedTwigleg
8aa3c2f091
2022-08-18 18:47:30 +02:00
9757c39f05 Moved a few more core classes. 2022-08-17 17:43:49 +02:00
99e94b08c4 Moved base input related classes to core/input. 2022-08-17 17:02:24 +02:00
686663d3e4 Moved around more classes in core. 2022-08-17 16:01:01 +02:00
04feb63860 Moved Engine and projectSettings. 2022-08-17 15:35:28 +02:00
dc9cc716c7 Moved Object related classes under core/object. 2022-08-17 13:45:14 +02:00
388b88678e Moved container related classes in core under a new containers directory. 2022-08-17 12:53:49 +02:00
0d2fc2e9f2 Moved color to core/math. 2022-08-17 11:38:15 +02:00
e71e3ed897 Now Vector4, Vector4i, Projection, PoolVector4Array, PoolVector4iArray, are built in variant types. Also reordered the Variant's Type enum, renamed _RID in it to RID, fixed a few smaller issues and removed some very old compat code. 2022-08-16 21:55:56 +02:00
220954cf08 Backported most of the improvements to String from Godot4. 2022-08-15 22:54:03 +02:00
e4cad690a3 Renamed elements in Transform2D to columns. 2022-08-14 15:37:05 +02:00
d9a8497546 Renamed translate in Transform2D to translate_local. 2022-08-14 14:59:46 +02:00
47358bfaab Backported: add viewport.get_camera_2d()
* there is now a more clear distinction between camera_2d and camera_3d functions in the engine code
* simplified camera2d's exported interface - now everything happens directly with the 'current' variable and make_current and clear_current are no longer exposed- there were some situations where calling one instead of set_current would result in incomplete results
* rebased to current godot master
- verdog
879f84d8f8
- Note that i did not rename the original Camera related methods.
2022-08-12 18:29:04 +02:00
53f274de2f Ported: AnimatedSprite Fix updating inspector when SpriteFrames is modified - kleonc
8ae246f15e
2022-08-07 16:20:57 +02:00
Marcel Admiraal
89737a1ad5 Ensure changes to Camera2D's limits don't affect smoothed_camera_pos 2022-07-30 00:29:44 +02:00
Marcel Admiraal
0d55a30eb1 When Camera2D enters tree, ensure first update is not lost 2022-07-30 00:29:28 +02:00