summaryrefslogtreecommitdiff
path: root/scene/2d/physics_body_2d.cpp
AgeCommit message (Collapse)Author
2019-06-27Add default values to the editor help, docs, and generated RSTBojidar Marinov
Also, make spacing of "=" in the editor help a bit more consistent. Closes #16086
2019-06-11Fix error macro calls not ending with semicolonRémi Verschelde
It's not necessary, but the vast majority of calls of error macros do have an ending semicolon, so it's best to be consistent. Most WARN_DEPRECATED calls did *not* have a semicolon, but there's no reason for them to be treated differently.
2019-04-08Small fixes, mostly dupicated codeqarmin
2019-03-18Add missing check for 2d physics bounce and friction settersKanabenki
The override check was already present for 3d physics but missing for 2d
2019-03-04Specifically error when users try to use sync to physics and move and slide, ↵Juan Linietsky
closes #26545
2019-02-23Ensure move and slide snap respects stop on slope, fixes #26180Juan Linietsky
2019-02-21Fixed bugs in test body motion and removed unnecesary test in ↵Juan Linietsky
move_and_slide. Fixes #25968
2019-02-16Change snapping to only happen when the floor normal remains as floor, fixes ↵Juan Linietsky
#22312
2019-02-16Make sure stop on slope can have a tiny bit of precision edge.Juan Linietsky
2019-01-01Update copyright statements to 2019Rémi Verschelde
Happy new year to the wonderful Godot community!
2018-12-14fix stop_on_slope affecting sliding up slopespiratesephiroth
2018-11-29Fixed using move_and_slide with stop_on_slope stopping too earlyDualMatrix
This makes it stop exactly on the slope, I'm not 100% sure if this if this is the correct fix let me know what you think. Fixes #23675
2018-11-21Make sure sync to physics is disabled in editor, fixes #20230Juan Linietsky
2018-11-12Merge pull request #17530 from bojidar-bg/17516-detect-deltaRémi Verschelde
Make it possible to call move_and_slide from _process, even if it is not recommended
2018-11-12Merge pull request #23090 from DavidSichma/inconsistent-kinematicRémi Verschelde
Consistency in KinematicBody
2018-11-08Make it possible to call move_and_slide from _process, even if it is not ↵Bojidar Marinov
recommended Previously, it would reuse the _physics_process delta, causing it to move faster on faster framerates Fixes #17516
2018-11-08-Moved EditorDefaultValue to ClassDB, made it coreJuan Linietsky
-Removed one and zero hints for properties, replaced by default value
2018-11-01Add method get_collision_exceptionsGuilherme Recchi Cardozo
Adding this method to PhysicsBody, PhysicsBody2D and SoftBody. It returns a list of nodes included in collision exceptions. Fixes #23235, cheers!
2018-10-17Fix inconsistency in KinematicBodyDavid Sichma
- moved new infinite_inertia argument of move_and_slide and move_and_slide_with_snap in KinematicBody and KinematicBody2D to the end if not already there. This makes the order of arguments consistent and should keep projects from 3.0 compatible as this argument did not exist in 3.0. Docs updated accordingly. - renamed max_bounces to max_slides for consistency. Docs updated accordingly. - the argument infinite_inertia in test_move is now optional, as it is in every other movement related method. This closes #22829.
2018-09-12Make core/ includes absolute, remove subfolders from include pathRémi Verschelde
This allows more consistency in the manner we include core headers, where previously there would be a mix of absolute, relative and include path-dependent includes.
2018-09-02PhysicsBody: Don't create PhysicsMaterial override for default friction/bounceRémi Verschelde
And don't save physics_material_override if null.
2018-09-01Improve ClassDB information for some some signal parametersKelly Thomas
2018-08-29Physics: Properly obsolete friction and bounce propertiesRémi Verschelde
Without this change any new PhysicsBody would show deprecation warnings due to default values for friction and bounce being defined. It also enforced a physics material override even when using default values.
2018-08-29Fix operator precedence in PhysicsBody2D::set_weightRémi Verschelde
Fixes #16038.
2018-08-24Make some debug prints verbose-only, remove othersRémi Verschelde
2018-08-23Revert "Take CanvasLayer transform into account for 2D physics"Rémi Verschelde
This reverts commit 4839e5f6d9ed1c0afee933009ab44b9913310d27. Fixes #21289.
2018-08-21Take CanvasLayer transform into account for 2D physicsPedro J. Estébanez
Fixes #18073.
2018-08-19Added ray shape and move_and_slide with snapping on 3D.Andrea Catania
Added stop_on_slope on 2d part
2018-08-10apply a threshold for floor angle, fixes #16037, fixes #15632Juan Linietsky
2018-08-07Merge pull request #20381 from AndreaCatania/phymat_2Juan Linietsky
Improved Physics material
2018-08-07Removed physics material combination mode. Added rough and absorbent ↵Andrea Catania
parameter to material. Fixed 'change' signal connection
2018-07-27Fix PhysicsBody build with deprecated=noRémi Verschelde
Fixes #20483.
2018-07-26Reduce unnecessary COW on Vector by make writing explicitHein-Pieter van Braam
This commit makes operator[] on Vector const and adds a write proxy to it. From now on writes to Vectors need to happen through the .write proxy. So for instance: Vector<int> vec; vec.push_back(10); std::cout << vec[0] << std::endl; vec.write[0] = 20; Failing to use the .write proxy will cause a compilation error. In addition COWable datatypes can now embed a CowData pointer to their data. This means that String, CharString, and VMap no longer use or derive from Vector. _ALWAYS_INLINE_ and _FORCE_INLINE_ are now equivalent for debug and non-debug builds. This is a lot faster for Vector in the editor and while running tests. The reason why this difference used to exist is because force-inlined methods used to give a bad debugging experience. After extensive testing with modern compilers this is no longer the case.
2018-07-24Modified RigidBody, PhysicsDirectBodyState, PhysicsServer, and their ↵Tiger Caldwell
respective 2D counterparts to be more consistent and to include more useful methods. RigidBody: - Added add_central_force - Added add_force - Added add_torque - Added apply_central_impulse RigidBody2D: - Added add_central_force - Added add_torque - Added apply_central_impulse - Added apply_torque_impulse PhysicsDirectBodyState: - Added apply_central_impulse Physics2DDirectBodyState: - Added add_central_force - Added add_force - Added add_torque - Added apply_central_impulse - Added apply_impulse - Added apply_torque_impulse PhysicsServer: - Added body_add_force - Added body_add_torque - Added body_add_central_force - Added body_apply_central_impulse Physics2DServer: - Added body_add_torque - Added body_add_central_force - Added body_apply_central_impulse - Added body_apply_torque_impulse Also fixed some small bugs along the way
2018-07-23Merge pull request #12403 from AndreaCatania/phymatJuan Linietsky
Physics material
2018-07-17Further fixes to KinematicBody2D API, support for sync motion in moving objectsJuan Linietsky
2018-07-16Changes to how snap works (I think this makes more sense now)Juan Linietsky
2018-07-16-Added support for raycast in KinematicBody2DJuan Linietsky
-Added support for snapping in KinematicBody2D
2018-05-11Implemented physics materialAndreaCatania
Hidden a function Fixed travis static check
2018-02-21Added forgotten infinite_inertia to bindingsAndrea Catania
Related to this comment: https://github.com/godotengine/godot/pull/16757#discussion_r169470394
2018-02-20Merge pull request #16757 from AndreaCatania/kinpushRémi Verschelde
Improved kinematic body, Now can move rigid body
2018-02-20Improved kinematic body 2D and 3D, Now can move rigid bodyAndrea Catania
2018-02-17Clean up some bad words from code commentsArtem Varaksa
2018-01-21Fix crash on deleted rigidbodies without contact monitor (issue 15904)Bernhard Liebl
2018-01-18Fix typos in code and docs with codespellRémi Verschelde
Using v1.11.0 from https://github.com/lucasdemarchi/codespell
2018-01-12Renamed tree_exited to tree_exiting. tree_exited is now used for actual out ↵Juan Linietsky
of tree notification. Updated doc accordingly.
2018-01-12Bind many more properties to scriptsBojidar Marinov
Notable potentially breaking changes: - PROPERTY_USAGE_NOEDITOR is now PROPERTY_USAGE_STORAGE | PROPERTY_USAGE_NETWORK, without PROPERTY_USAGE_INTERNAL - Some properties were renamed, and sometimes even shadowed by new ones - New getter methods (some virtual) were added
2018-01-05Add missing copyright headers and fix formattingRémi Verschelde
Using `misc/scripts/fix_headers.py` on all Godot files. Some missing header guards were added, and the header inclusion order was fixed in the Bullet module.
2018-01-01Update copyright statements to 2018Rémi Verschelde
Happy new year to the wonderful Godot community!
2017-12-07Style: Apply new clang-format 5.0 style to all filesRémi Verschelde