summaryrefslogtreecommitdiffstats
path: root/servers/physics_2d/collision_object_2d_sw.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Rename Godot Physics classes from *SW to Godot*PouleyKetchoupp2021-10-181-243/+0
| | | | | Also moved MT physics server wrappers to the main servers folder, since they don't have to be implementation specific.
* Remove shape metadata from 2D physics serverPouleyKetchoupp2021-09-301-5/+0
| | | | | | Shape metadata was only used to get tile information when colliding with tilemaps. It's not needed anymore since there's an API in tilemap using body ids instead.
* Initialize variables in servers/physicsqarmin2021-09-151-5/+0
|
* Fix and clean disabled shapes handling in godot physics serversPouleyKetchoupp2021-06-221-10/+1
| | | | | | | | | | | | | In 3D, disabled shapes are now not added to the broadphase anymore. Since they are removed right away when disabled, no need to check for disabled shapes for any query that comes from the broadphase. Also Fixes raycast queries returning disabled shapes. In 2D, disabled shapes where already not added to the broadphase. Remove the same unnecessary checks as in 3D. Overall harmonized API for disabled shapes in the physics servers and removed duplicate method.
* Dynamic BVH broadphase in 2D & 3D Godot PhysicsPouleyKetchoupp2021-05-101-12/+12
| | | | | | | | | | | | | | Port lawnjelly's dynamic BVH implementation from 3.x to be used in both 2D and 3D broadphases. Removed alternative broadphase implementations which are not meant to be used anymore since they are much slower. Includes changes in Rect2, Vector2, Vector3 that help with the template implementation of the dynamic BVH by uniformizing the interface between 2D and 3D math. Co-authored-by: lawnjelly <lawnjelly@gmail.com>
* Update copyright statements to 2021Rémi Verschelde2021-01-011-2/+2
| | | | | | | | | | | | | | 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 🎆
* Style: Enforce braces around if blocks and loopsRémi Verschelde2020-05-141-9/+18
| | | | | Using clang-tidy's `readability-braces-around-statements`. https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html
* Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocksRémi Verschelde2020-05-141-20/+0
| | | | | | | | | | | | | | 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.
* Replace NULL with nullptrlupoDharkael2020-04-021-1/+1
|
* Renaming of servers for coherency.Juan Linietsky2020-03-271-7/+7
| | | | | | | | | | VisualServer -> RenderingServer PhysicsServer -> PhysicsServer3D Physics2DServer -> PhysicsServer2D NavigationServer -> NavigationServer3D Navigation2DServer -> NavigationServer2D Also renamed corresponding files.
* ObjectID converted to a structure, fixes many bugs where used incorrectly as ↵Juan Linietsky2020-02-121-2/+0
| | | | 32 bits.
* Update copyright statements to 2020Rémi Verschelde2020-01-011-2/+2
| | | | | | | | | | | 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.
* add 2d physic optimization simlilar to 3d physicsyakun.zhang2019-06-211-11/+34
|
* Allow adding disabled shapesShyRed2019-04-231-2/+2
| | | | 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.
* -Re-added margins in one way collision (made in a more user friendly way ↵Juan Linietsky2019-01-181-0/+1
| | | | | | than in Godot 2.1), fixes #23860 -Fixed potential bug in OWC (i dont think anyone had it but..)
* Update copyright statements to 2019Rémi Verschelde2019-01-011-2/+2
| | | | Happy new year to the wonderful Godot community!
* Fix picking in CanvasLayerPedro J. Estébanez2018-08-251-0/+1
| | | | 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.
* Reduce unnecessary COW on Vector by make writing explicitHein-Pieter van Braam2018-07-261-11/+11
| | | | | | | | | | | | | | | | | | | | | | | 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.
* Remove disabled shapes from physicsShyRed2018-03-071-0/+28
| | | | Disabling a shape removes it from physics calculations. Enabling a shape adds it back to the physics calculations.
* Fix 2d collision body update on shape removeKonrad Nowakowski2018-02-181-0/+1
|
* Add missing copyright headers and fix formattingRémi Verschelde2018-01-051-0/+1
| | | | | | 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.
* Update copyright statements to 2018Rémi Verschelde2018-01-011-2/+2
| | | | Happy new year to the wonderful Godot community!
* Use HTTPS URL for Godot's website in the headersRémi Verschelde2017-08-271-1/+1
|
* -Trigger shapes removed in 2D, they became obsolete long ago when areas ↵Juan Linietsky2017-06-231-1/+2
| | | | | | | | | | | 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!
* Refactor layer_mask to collision_layerPoommetee Ketson2017-06-141-1/+1
|
* renamed all Rect2.pos to Rect2.positionalexholly2017-06-041-1/+1
|
* Add "Godot Engine contributors" copyright lineRémi Verschelde2017-04-081-0/+1
|
* A Whole New World (clang-format edition)Rémi Verschelde2017-03-051-79/+65
| | | | | | | | | | | | | | | | | | | | | | | | 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
* Type renames:Juan Linietsky2017-01-111-4/+4
| | | | | | | | | | | | Matrix32 -> Transform2D Matrix3 -> Basis AABB -> Rect3 RawArray -> PoolByteArray IntArray -> PoolIntArray FloatArray -> PoolFloatArray Vector2Array -> PoolVector2Array Vector3Array -> PoolVector3Array ColorArray -> PoolColorArray
* Welcome in 2017, dear changelog reader!Rémi Verschelde2017-01-011-1/+1
| | | | | | | | 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!
* Update copyright to 2016 in headersGeorge Marques2016-01-011-1/+1
|
* -new collision layer & mask system for 2D, for more flexible collision maskingJuan Linietsky2015-05-031-1/+1
|
* Updated copyright year in all headersJuan Linietsky2015-04-181-1/+1
|
* input events on Area2D is now supportedJuan Linietsky2015-03-221-0/+1
| | | | also added a demo showing how this works
* -added custom metadata to physics shapes (2D only for now)Juan Linietsky2014-10-161-0/+8
| | | | -gizmos are not displayed in camera preview
* A bit of everything:Juan Linietsky2014-05-141-0/+1
| | | | | | | | | | | | | -IMA-ADPCM support for samples, this means that sound effects can be compressed and use 4 timess less RAM. -New 3D import workflow based on Wavefront OBJ. Import single objects as mesh resources instead of full scenes. Many people prefers to work this way. Just like the rest of the imported resources, these are updated in realtime if modified externally. -Mesh resources now support naming surfaces. This helps reimporting to identify which user-created materials must be kept. -Several fixes and improvements to SurfaceTool. -Anti Aliasing added to WorldEnvironment effects (using FXAA) -2D Physics bodies (RigidBody, KinematicBody, etc), Raycasts, Tilemap, etc support collision layers. This makes easy to group which objects collide against which. -2D Trigger shapes can now also trigger collision reporting in other 2D bodies (it used to be in Area2D before) -Viewport render target textures can now be filtered. -Few fixes in GDscript make it easier to work with static functions and class members. -Several and many bugfixes.
* -added kinematic bodyJuan Linietsky2014-02-221-0/+1
| | | | -added kinematic body demos
* -improved physics ccdJuan Linietsky2014-02-191-0/+1
| | | | | | -html5 exporter works again -disable repeat on image loader by default -can change shape offset en tileset, texture offset was broken
* GODOT IS OPEN SOURCEJuan Linietsky2014-02-091-0/+220