summaryrefslogtreecommitdiff
path: root/scene/2d/collision_object_2d.h
AgeCommit message (Collapse)Author
2021-08-23Entirely removes BIND_VMETHOD in favor of GDVIRTUALreduz
* `_gui_input`, `_input`, `_unhandled_input` and `_unhandled_key_input` are now regular C++ virutal functions. * Everything else converted to GDVIRTUAL * BIND_VMETHOD is gone, always use the new syntax from now on. Creating `_gui_input` method and using the binder to register events will no longer work, simply override the virtual function now.
2021-08-12Uniformize layer names, script methods and documentationPouleyKetchoupp
- Back to 1-based layer names to make it clearer in editor UI - Layer bit accessors are renamed to layer value and 1-based too - Uniform errors and documentation in render and physics - Fix a few remaining collision_layer used in place of collision_mask
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-02Add mouse_shape_entered and mouse_shape_exited signals to CollisionObject2D.sygi
Co-authored-by: Hugo Locurcio <hugo.locurcio@hugo.pro>
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-04KinematicBody split between new CharacterBody and PhysicsBodyPouleyKetchoupp
PhysicsBody now has methods move_and_collide/test_move and needed properties for these methods: safe margin, locked axes (3D only). Moved collision_exceptions from StaticBody to PhysicsBody for 3D (same as 2D, and conforms to documentation). RigidBody doesn't have test_motion method anymore, it's now redundant with PhysicsBody.test_move.
2021-04-20Move collision layer and mask into CollisionObject.Marcel Admiraal
2021-04-11Use Array for node configuration warningsNathan Franke
Previously, the warnings were passed as a string and delimitation of which were hard coded at each implementation.
2021-02-07Initialize class variables with default values in scene/ [1/2]Rafał Mikrut
2021-01-29Use real_t in physics nodesAaron Franke
2021-01-01Update copyright statements to 2021Rémi Verschelde
Happy new year to the wonderful Godot community! 2020 has been a tough year for most of us personally, but a good year for Godot development nonetheless with a huge amount of work done towards Godot 4.0 and great improvements backported to the long-lived 3.2 branch. We've had close to 400 contributors to engine code this year, authoring near 7,000 commit! (And that's only for the `master` branch and for the engine code, there's a lot more when counting docs, demos and other first-party repos.) Here's to a great year 2021 for all Godot users 🎆
2020-07-10Add override keywords.Marcel Admiraal
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-02Replace NULL with nullptrlupoDharkael
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-09-23fix kinematicBody2D jitters when sync_to_physics is turned on, closes #28181RaphaelHunter
2019-06-19Made use of semicolons more consitent, fixed formattingJohnJLight
2019-01-18-Re-added margins in one way collision (made in a more user friendly way ↵Juan Linietsky
than in Godot 2.1), fixes #23860 -Fixed potential bug in OWC (i dont think anyone had it but..)
2019-01-01Update copyright statements to 2019Rémi Verschelde
Happy new year to the wonderful Godot community!
2018-07-17Further fixes to KinematicBody2D API, support for sync motion in moving objectsJuan Linietsky
2018-01-18Before I forget, add warnings on areas without children (should not break ↵Juan Linietsky
anything). Seen too many users misunderstanding the edit rect is the shape.
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-08-27Use HTTPS URL for Godot's website in the headersRémi Verschelde
2017-07-24expose missing CollisionShape API for CollisionObjectJakub Grzesik
2017-07-01Readd tilemap's shape_transform and bugfixesBojidar Marinov
This reverts commit a808f53020aa710ff81392e2349b8a39c55d2717.
2017-07-01Revert "Fix Tileset/tilemap issues related to my adding of one-way ↵Juan Linietsky
collisions to them"
2017-06-30Fix #9409, fixup #9370; tileset now has shape transform instead of offsetBojidar Marinov
Fix bad return type in CollisionObject2D, Shape -> Shape2D. Was causing unintended null when casting. (9409) Fix a misplaced ++ operator. (9370) Fix merging with exiting tileset duplicating shapes. (9370)
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-05-20Removal of InputEvent as built-in Variant type..Juan Linietsky
this might cause bugs I haven't found yet..
2017-04-08Add "Godot Engine contributors" copyright lineRémi Verschelde
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-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-01-01Update copyright to 2016 in headersGeorge Marques
2015-04-18Updated copyright year in all headersJuan Linietsky
2015-03-22input events on Area2D is now supportedJuan Linietsky
also added a demo showing how this works
2014-02-09GODOT IS OPEN SOURCEJuan Linietsky