summaryrefslogtreecommitdiff
path: root/servers/physics_2d
AgeCommit message (Collapse)Author
2018-09-13Merge pull request #21982 from luzpaz/misc-typosRémi Verschelde
Misc. typos
2018-09-12Misc. typosluz.paz
Found via `codespell -q 3 -I ../godot-word-whitelist.txt --skip="./thirdparty,*.po"`
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-24Make some debug prints verbose-only, remove othersRémi Verschelde
2018-08-21Changes to ClippedCamera, RayCast,Raycast2D and 2D physics API to add ↵Juan Linietsky
ability to choose between bodies and areas when colliding.
2018-08-16add project method to Vector2/3Thomas Herzog
2018-08-11[Core] Completely kill math_2d.h, change includesAaron Franke
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-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-16-Added support for raycast in KinematicBody2DJuan Linietsky
-Added support for snapping in KinematicBody2D
2018-05-26Merge pull request #18349 from Gorgexpress/masterMax Hilbrunner
Fixed 2D intersect_shape limiting broadphase results
2018-05-11Implemented physics materialAndreaCatania
Hidden a function Fixed travis static check
2018-05-07Merge pull request #18144 from ↵Juan Linietsky
Crazy-P/Resolves-crash-on-shape2D-culling-for-empty-Concave-shapes Resolves crash on shape2D culling for empty Concave shapes
2018-04-22Fixed 2D intersect_shape limiting broadphase resultsMichael
Physics2DDirectSpaceStateSW was applying the result limit to broadphase collision detection instead of narrow. This is inconsistent with its 3D variant, as well as the rest of the 2D direct space state functions. Broadphase is now limited by INTERSECTION_QUERY_MAX like everything else, and narrow phase is exited early when the result limit has been reached.
2018-04-19Fix Coverity reports of uninitialized scalar variableRémi Verschelde
Fixes most current reports on Coverity Scan of uninitialized scalar variable (CWE-457): https://cwe.mitre.org/data/definitions/457.html These happen most of the time (in our code) when instanciating structs without a constructor (or with an incomplete one), and later returning the instance. This is sometimes intended though, as some parameters are only used in some situations and should not be double-initialized for performance reasons (e.g. `constant` in ShaderLanguage::Token).
2018-04-12Resolves crash on shape2D culling for empty Concave shapesCrazy-P
Fixes https://github.com/godotengine/godot/issues/17789
2018-04-08Merge pull request #17151 from ShyRed/disabled_shapes_2dJuan Linietsky
Remove disabled shapes from physics 2D calculations
2018-03-07Bring back Vector2.cross()Bernhard Liebl
2018-03-07Remove disabled shapes from physicsShyRed
Disabling a shape removes it from physics calculations. Enabling a shape adds it back to the physics calculations.
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-19Merge pull request #16530 from AndreaCatania/raysRémi Verschelde
Improved ray shape (2D and 3D) by addiing the possibility to act as r…
2018-02-19Improved ray shape (2D and 3D) by addiing the possibility to act as regular ↵Andrea Catania
shape
2018-02-18Fix 2d collision body update on shape removeKonrad Nowakowski
2018-02-17Clean up some bad words from code commentsArtem Varaksa
2018-02-05Added physics API in order to enable/disable collisions between rigidbody ↵Andrea Catania
attached to a joint with bullet physics bullet Fixes #16424
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
2017-11-21Removed type_mask and fixed some variable nameAndreaCatania
2017-11-10Remove node from list before calling queries, fixes #10886Juan Linietsky
2017-11-09Reworked how servers preallocate RIDs, should fix #10970Juan Linietsky
2017-11-08Fixing bad index used in Space2DSWMateusMP
Fix wrong col_obj access using wrong index variable. Related with issue #11695
2017-10-31Merge pull request #10770 from RandomShaper/fix-jointsRémi Verschelde
Fix joints collision exceptions, plus a bit more
2017-10-21Rename RayCasts collision_layer to collision_maskPedro J. Estébanez
The point is that `RayCast`s are checked against objects' `collision_layer`(s), but they themselves are considered no to _belong_ to any layer. Therefore, the correct name for their property is `collision_mask`, rather than `collision_layer`. Only renaming is needed since the behavior was already the right one, only that it wasn't matching what users would expect from the name and description of the property. Fixes #7589, where it's also discussed.
2017-10-12Prevent a possible crash at collision_object_2d_sw.hMarcelo Fernandez
2017-10-09Merge pull request #11702 from AndreaCatania/bodyDSRémi Verschelde
Added new API to get body direct state
2017-09-30Renamed fixed_process to physics_processAndreaCatania
2017-09-29Added new API to get body direct stateAndreaCatania
2017-09-25Removed print_line in Physics2DServerWrapMT::init()Indah Sylvia
2017-09-20Rename pos to position in user facing methods and variablesletheed
Rename user facing methods and variables as well as the corresponding C++ methods according to the folloming changes: * pos -> position * rot -> rotation * loc -> location C++ variables are left as is.
2017-09-17correction to one way collision codeJuan Linietsky
2017-09-17fixes to one way collision, closes #10971Juan Linietsky
2017-09-09Remove joint freeing logic from physics serversPedro J. Estébanez
Since joint resources are created by joint nodes and also they take care of freeing them, the physics server doesn't need to free bodies' joints explicitly. The logic for clearing the constraints map/set is still relevant as there may be collision pairs and in their case its the server itself the one creating them and therefore releasing them.
2017-09-01Fix signed and unsigned comparisonsHein-Pieter van Braam
The first in my quest to make Godot 3.x compile with -Werror on GCC7
2017-08-31Fix special case where KinematicBody fails one way collisions by adding ↵Juan Linietsky
exclusion lists, closes #9729