summaryrefslogtreecommitdiff
path: root/scene/2d
AgeCommit message (Collapse)Author
2021-08-09Some work on double supportAaron Franke
2021-08-09Merge pull request #51446 from nekomatata/fix-moving-platform-rotationRémi Verschelde
Fix applied rotation from moving platforms in move_and_slide
2021-08-09Fix applied rotation from moving platforms in move_and_slidePouleyKetchoupp
When synchronizing CharacterBody motion with moving the platform using direct body state, only the linear velocity was taken into account. This change exposes velocity at local point in direct body state and uses it in move_and_slide to get the proper velocity that includes rotations.
2021-08-09Use doubles for time in many other placesAaron Franke
2021-08-05Fix get_used_rect() calculationkobewi
2021-08-03Fix inverted condition in CharacterBody2D/3D set_max_slidesPouleyKetchoupp
2021-08-02Implements TileMap layers and move TileSetPlugins's functions to the TileMap ↵Gilles Roudière
node instead
2021-07-30Merge pull request #50935 from Vitika9/50807Rémi Verschelde
2021-07-27Merge pull request #50905 from fabriceci/fix-multiple-direction-collisionRémi Verschelde
Allow multiple collision direction at the same time
2021-07-27Fixed Camera2D's reset_smoothing() does not work as describedvitika9
2021-07-27Add check to internal methods to prevent crashHaoyu Qiu
2021-07-26Allow to have multiple collision direction at the same timefabriceci
2021-07-25Use const references where possible for List range iteratorsRémi Verschelde
2021-07-23Use C++ iterators for Lists in many situationsAaron Franke
2021-07-21Implement atlas merging and tile proxiesGilles Roudière
2021-07-21Import old tiles in SINGLE_TILE mode as atlasesGilles Roudière
2021-07-20Merge pull request #38317 from verdog/get-cam-2d-4.0Rémi Verschelde
add viewport.get_camera_2d()
2021-07-18Optimize StringName usagereduz
* Added a new macro SNAME() that constructs and caches a local stringname. * Subsequent usages use the cached version. * Since these use a global static variable, a second refcounter of static usages need to be kept for cleanup time. * Replaced all theme usages by this new macro. * Replace all signal emission usages by this new macro. * Replace all call_deferred usages by this new macro. This is part of ongoing work to optimize GUI and the editor.
2021-07-16Merge pull request #47395 from sygi/shape_idx_collisionHugo Locurcio
Add shape_idx to CollisionObject2D mouse_entered signal
2021-07-15Move sync to physics to StaticBody2DPouleyKetchoupp
Now static body is used for moving platforms through kinematic motion property, so sync to physics needs to be in StaticBody2D instead of CharacterBody2D. Constant kinematic motion is also supported in combination with sync to physics for smoother movements.
2021-07-15Fixing 2D moving platform logicfabriceci
Fixing by applying the movement in two steps, first the platform movement, and then the body movement. Plus, add the platform movement when we are on_wall.
2021-07-14Merge pull request #49348 from Geometror/fix-particles-hidden-basecolorRémi Verschelde
Fix color properties of particle nodes/material
2021-07-04Fix color properties of particle nodes/materialHendrik Brucker
2021-07-03add viewport.get_camera_2d()Josh Chandler
* 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
2021-07-02Add mouse_shape_entered and mouse_shape_exited signals to CollisionObject2D.sygi
Co-authored-by: Hugo Locurcio <hugo.locurcio@hugo.pro>
2021-07-01Make move_and_slide collision detection more accuratePouleyKetchoupp
More accurate unsafe motion calculation * Safe and unsafe motion are calculated by dichotomy with a limited number of steps. It's good for performance, but on long motions that either collide near the beginning or near the end, the result can be very imprecise. * Now a factor 0.25 or 0.75 is used to converge faster when this case happens, which allows longer motions to get more accurate collision detection. * Makes snap collision more precise, and helps with cases where diagonal collision on the border of a platform can lead to the character being stuck. Additional improvements to move_and_slide: * Handle slide canceling in move_and_collide with 0 velocity instead of not applying it. * Better handling of snap with custom logic to cancel sliding. * Remove small jittering when using stop on slope, by canceling the motion completely when the resulting motion is less than margin instead of always projecting to the up direction (in both body motion and snap). Co-authored-by: fabriceci <fabricecipolla@gmail.com>
2021-07-01Use PROPERTY_USAGE_NONE instead of 0 for no property usageAaron Franke
Also use const more often.
2021-06-30Enable Camera2D smoothing on limit changeEric
2021-06-30Merge pull request #49834 from nekomatata/physics-disable-modesRémi Verschelde
Add support for controlling physics nodes' behavior when disabled
2021-06-30Merge pull request #50009 from reduz/fix-suffixes-and-degreesRémi Verschelde
Fix editor suffixes and degrees conversion
2021-06-30Add support for controlling physics nodes' behavior when disabledPouleyKetchoupp
New property disable_mode to set different behaviors: Remove: remove from physics simulation MakeStatic: change body mode to static (doesn't affect area and soft body) KeepActive: do nothing Extra change: Handle disable/enable node state with specific notifications, in order to differentiate global pause from disabled nodes.
2021-06-30Fix editor suffixes and degrees conversionreduz
* Functions to convert to/from degrees are all gone. Conversion is done by the editor. * Use PROPERTY_HINT_ANGLE instead of PROPERTY_HINT_RANGE to edit radian angles in degrees. * Added possibility to add suffixes to range properties, use "min,max[,step][,suffix:<something>]" example "0,100,1,suffix:m" * In general, can add suffixes for EditorSpinSlider Not covered by this PR, will have to be addressed by future ones: * Ability to switch radians/degrees in the inspector for angle properties (if actually wanted). * Animations previously made will most likely break, need to add a way to make old ones compatible. * Only added a "px" suffix to 2D position and a "m" one to 3D position, someone needs to go through the rest of the engine and add all remaining suffixes. * Likely also need to track down usage of EditorSpinSlider outside properties to add suffixes to it too.
2021-06-30Merge pull request #49901 from nekomatata/move-and-collide-fix-slideRémi Verschelde
Fix move_and_collide causing sliding on slopes
2021-06-29Merge pull request #49719 from LightningAA/rename-node-is-ancestor-ofRémi Verschelde
Rename `is_a_parent_of()` to `is_ancestor_of()`
2021-06-28Fix move_and_collide causing sliding on slopesPouleyKetchoupp
Make sure the direction of the motion is preserved, unless the depth is higher than the margin, which means the body needs depenetration in any direction. Also changed move_and_slide to avoid sliding on the first motion, in order to avoid issues with unstable position on ground when jumping. Co-authored-by: fabriceci <fabricecipolla@gmail.com>
2021-06-24Fix polygon 2D rendering blackGilles Roudière
2021-06-21Rename `is_a_parent_of()` to `is_ancestor_of()`Lightning_A
2021-06-19Rename `instance()`->`instantiate()` when it's a verbLightning_A
2021-06-18Merge pull request #49475 from nekomatata/kinematic-collision-ridRémi Verschelde
Expose collider RID in 2D/3D kinematic collision
2021-06-17Add PROPERTY_USAGE_NONE and use itAaron Franke
2021-06-16Rename VisibilityNotifierXD to VisibleOnScreenNotifierXDreduz
* Renames for 2D and 3D * Class name was confusing, given both 2D and 3D have a "visible" property that is unrelated to actual on-screen visibility. * New name makes it clear that this is about visibility on screen.
2021-06-16Refactor VisibilityNotifierreduz
* Works from RenderinServer * Accurately tells when on or off-scren, its no longer approximate. * VisibilityEnabler also simplified to use the process mode instead.
2021-06-14Fix crash when using TileMap::fix_invalid_tilesHaoyu Qiu
2021-06-13Merge pull request #49526 from Chaosus/fix_textureregion_errorsRémi Verschelde
2021-06-13Initialize PhysicalBone2D::parent_skeletonHaoyu Qiu
2021-06-12Fixed a bunch of connection errors in TextureEditorPluginYuri Roubinsky
2021-06-11Rename Reference to RefCountedPedro J. Estébanez
2021-06-09Expose collider RID in 2D/3D kinematic collisionPouleyKetchoupp
Can be useful to access the colliding body information for bodies created with the physics server directly.
2021-06-09Merge pull request #49395 from nekomatata/floor-max-angle-degreesRémi Verschelde
Use degrees instead of rad for floor_max_angle property in CharacterBody
2021-06-08Use degrees instead of rad for floor_max_angle property in CharacterBodyPouleyKetchoupp