summaryrefslogtreecommitdiff
path: root/scene/2d/physics_body_2d.h
AgeCommit message (Collapse)Author
2020-11-27Remove RigidBody weight propertyMarcel Admiraal
2020-11-07Reorganized core/ directory, it was too fatty alreadyreduz
-Removed FuncRef, since Callable makes it obsolete -Removed int_types.h as its obsolete in c++11+ -Changed color names code
2020-10-13Remove old RigidBody layers property and methods.Marcel Admiraal
2020-07-10Add override keywords.Marcel Admiraal
2020-06-02Refactor physics force and impulse codeAaron Franke
2020-05-14Style: Enforce braces around if blocks and loopsRémi Verschelde
Using clang-tidy's `readability-braces-around-statements`. https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html
2020-05-14Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocksRémi Verschelde
Which means that reduz' beloved style which we all became used to will now be changed automatically to remove the first empty line. This makes us lean closer to 1TBS (the one true brace style) instead of hybridating it with some Allman-inspired spacing. There's still the case of braces around single-statement blocks that needs to be addressed (but clang-format can't help with that, but clang-tidy may if we agree about it). Part of #33027.
2020-04-21Add proper type to most public API uses of ArrayJuan Linietsky
2020-03-28More server renames for consistency after #37361Rémi Verschelde
2020-03-27Renaming of servers for coherency.Juan Linietsky
VisualServer -> RenderingServer PhysicsServer -> PhysicsServer3D Physics2DServer -> PhysicsServer2D NavigationServer -> NavigationServer3D Navigation2DServer -> NavigationServer2D Also renamed corresponding files.
2020-03-17Style: Set clang-format Standard to Cpp11Rémi Verschelde
For us, it practically only changes the fact that `A<A<int>>` is now used instead of the C++03 compatible `A<A<int> >`. Note: clang-format 10+ changed the `Standard` arguments to fully specified `c++11`, `c++14`, etc. versions, but we can't use `c++17` now if we want to preserve compatibility with clang-format 8 and 9. `Cpp11` is still supported as deprecated alias for `Latest`.
2020-02-12Remove deprecated PhysicsBody friction and bounce parametersRémi Verschelde
They were replaced in 3.1 by PhysicsMaterial properties via #12403.
2020-01-10Added function to expose floor normal, useful to correctly calculate player ↵Andrea Catania
velocity. This work has been kindly sponsored by IMVU.
2020-01-01Update copyright statements to 2020Rémi Verschelde
Happy new year to the wonderful Godot community! We're starting a new decade with a well-established, non-profit, free and open source game engine, and tons of further improvements in the pipeline from hundreds of contributors. Godot will keep getting better, and we're looking forward to all the games that the community will keep developing and releasing with it.
2019-06-26Some code changed with Clang-Tidyqarmin
2019-01-01Update copyright statements to 2019Rémi Verschelde
Happy new year to the wonderful Godot community!
2018-11-12Merge pull request #23090 from DavidSichma/inconsistent-kinematicRémi Verschelde
Consistency in KinematicBody
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-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-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-20Improved kinematic body 2D and 3D, Now can move rigid bodyAndrea Catania
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-09-10Added to kinematicbody2d the copy and paste of the API friendler of ↵Aron de Castro
KinematicBody
2017-08-27Use HTTPS URL for Godot's website in the headersRémi Verschelde
2017-08-05Warn about resizing a rigidbody (2D or 3D), covers the most common cases, ↵Juan Linietsky
closes #7615
2017-06-24Simplified 2D Kinematicbody.. 3D will wait a bit.Juan Linietsky
2017-06-23-Trigger shapes removed in 2D, they became obsolete long ago when areas ↵Juan Linietsky
could detect their own overlap -Added ability to disable individual collisionshape/polygon -Moved One Way Collision to shape, allowing more flexibility -Changed internals of CollisionObject, shapes are generated from child nodes on the fly, not stored inside any longer. -Modifying a CollisionPolygon2D on the fly now works, it can even be animated. Will port this to 3D once well tested. Have fun!
2017-06-14Refactor layer_mask to collision_layerPoommetee Ketson
2017-04-08Add "Godot Engine contributors" copyright lineRémi Verschelde
2017-04-04Fix is_move_and_slide_on_wall, make move_and_slide floor angle configurableBojidar Marinov
Fixes #7313
2017-03-05A Whole New World (clang-format edition)Rémi Verschelde
I can show you the code Pretty, with proper whitespace Tell me, coder, now when did You last write readable code? I can open your eyes Make you see your bad indent Force you to respect the style The core devs agreed upon A whole new world A new fantastic code format A de facto standard With some sugar Enforced with clang-format A whole new world A dazzling style we all dreamed of And when we read it through It's crystal clear That now we're in a whole new world of code
2017-01-13Rename collision layer as suggested in #5696Juan Linietsky
2017-01-11Type renames:Juan Linietsky
Matrix32 -> Transform2D Matrix3 -> Basis AABB -> Rect3 RawArray -> PoolByteArray IntArray -> PoolIntArray FloatArray -> PoolFloatArray Vector2Array -> PoolVector2Array Vector3Array -> PoolVector3Array ColorArray -> PoolColorArray
2017-01-02ObjectTypeDB was renamed to ClassDB. Types are meant to be more generic to ↵Juan Linietsky
Variant. All usages of "type" to refer to classes were renamed to "class" ClassDB has been exposed to GDScript. OBJ_TYPE() macro is now GDCLASS()
2017-01-01Welcome in 2017, dear changelog reader!Rémi Verschelde
That year should bring the long-awaited OpenGL ES 3.0 compatible renderer with state-of-the-art rendering techniques tuned to work as low as middle end handheld devices - without compromising with the possibilities given for higher end desktop games of course. Great times ahead for the Godot community and the gamers that will play our games!
2016-09-01-Fixed issue in Kinematicbody2DJuan Linietsky
2016-08-31More improvements to visual script..Juan Linietsky
fixed a bug of not saving when sub-nodes changed.
2016-08-28Several all around fixes to visual scripting (in the process of creating demos)Juan Linietsky
2016-04-26RigidBody2D (add_force, set_inertia): new methods.Josh Grams
2016-04-24RigidBody2D: rename apply_impulse(pos) to offset.Josh Grams