summaryrefslogtreecommitdiff
path: root/scene/2d/collision_object_2d.cpp
AgeCommit message (Collapse)Author
2019-08-30Remove some unneeded checks in CollisionObject(2D)Michael Alexsander Silva Dias
2019-07-09Improve the node configuration warning displayHugo Locurcio
- Refer to properties explicitly when possible - When multiple warnings are returned, always separate them by one blank line to make them easier to distinguish - Improve grammar and formatting
2019-06-27Allow ColisionObject2D to get shapes from tilemapsBojidar Marinov
Fixes #4454 and likely resolves #22285
2019-04-23Allow adding disabled shapesShyRed
Adds the ability to directly add disabled shapes to a collision object. Before this commit a shape has always been assumed to be enabled and had to be disabled in an extra step.
2019-04-05Fix -Wimplicit-fallthrough warnings from GCC 8Rémi Verschelde
Adds `FALLTHROUGH` macro to specify when a fallthrough is intentional. Can be replaced by `[[fallthrough]]` if/when we switch to C++17. The warning is now enabled by default for GCC on `extra` warnings level (part of GCC's `-Wextra`). It's not enabled in Clang's `-Wextra` yet, but we could enable it manually once we switch to C++11. There's no equivalent feature in MSVC for now. Fixes #26135.
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-11-07Merge pull request #21386 from RandomShaper/fix-picking-in-canvas-layersJuan Linietsky
Fix picking in CanvasLayer
2018-09-01Improve ClassDB information for some some signal parametersKelly Thomas
2018-08-25Fix picking in CanvasLayerPedro J. Estébanez
New APIs in 2D physics allow intersection queries filtered by CanvasLayer object instance id. Viewport keep an inventory of its descendant CanvasLayers and takes advantage of all that to test picking with the mouse/touch position correctly transformed for each CanvasLayer.
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-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-17Further fixes to KinematicBody2D API, support for sync motion in moving objectsJuan Linietsky
2018-02-19Improve CollisionObject/CollisionObject2D warning messageChris Bradfield
2018-01-20Fix minor typo: it's -> itsYuri Chornoivan
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-09-24Fix: CollisionObject shape owner indexing is inconsistentdamarindra
2017-08-27Use HTTPS URL for Godot's website in the headersRémi Verschelde
2017-08-10Removes type information from method bindsIgnacio Etcheverry
2017-08-07Makes all Godot API's methods Lower CaseIndah Sylvia
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-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-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-02-15Many fixes to make exported scenes work better, still buggy.Juan Linietsky
2017-02-13Rename the _MD macro to D_METHODHein-Pieter van Braam
This new name also makes its purpose a little clearer This is a step towards fixing #56
2017-02-13Remove use of _SCS from ADD_METHODHein-Pieter van Braam
This saves typing and is a step towards fixing #56
2017-01-14Style: Fix whole-line commented codeRémi Verschelde
They do not play well with clang-format which aligns the `//` part with the rest of the code block, thus producing badly indented commented code.
2017-01-13New API for visibility in both CanvasItem and SpatialJuan Linietsky
visible (property) - access set_visible(bool) is_visible() is_visible_in_tree() - true when visible and parents visible show() hide() - for convenience
2017-01-12Must now register with set_transform_notify() to get ↵Juan Linietsky
NOTIFICATION_TRANSFORM_CHANGED
2017-01-12Renamed most signals so they refer to:Juan Linietsky
-An action being requested to the user in present tense: (ie, draw, gui_input, etc) -A notification that an action happened, in past tense (ie, area_entered, modal_closed, etc).
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-04-Conversion of most properties to a simpler syntax, easier to use by scriptJuan Linietsky
-Modified help to display properties GDScript can still not make use of them, though.
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-03-09remove trailing whitespaceHubert Jarosz
2016-01-23Merge pull request #2698 from Faless/add_area_fixJuan Linietsky
Fix bug in Body(2D)SW::add_area
2016-01-01Update copyright to 2016 in headersGeorge Marques
2015-12-02Properly update node after clearing shapes in _update_shapes_from_children()Fabio Alessandrelli
(fix bug causing eg. CircleShape2D.set_radius to generate multiple shapes)
2015-06-29Several performance improvements, mainly in loading and instancing scenes ↵Juan Linietsky
and resources. A general speedup should be apparent, with even more peformance increase when compiling optimized. WARNING: Tested and it seems to work, but if something breaks, please report.
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