summaryrefslogtreecommitdiffstats
path: root/servers/physics_server.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Renaming of servers for coherency.Juan Linietsky2020-03-271-800/+0
| | | | | | | | | | VisualServer -> RenderingServer PhysicsServer -> PhysicsServer3D Physics2DServer -> PhysicsServer2D NavigationServer -> NavigationServer3D Navigation2DServer -> NavigationServer2D Also renamed corresponding files.
* Variant: Added 64-bit packed arrays, renamed Variant::REAL to FLOAT.Juan Linietsky2020-02-251-5/+5
| | | | | | | | | | | | | | | | | | | | | - Renames PackedIntArray to PackedInt32Array. - Renames PackedFloatArray to PackedFloat32Array. - Adds PackedInt64Array and PackedFloat64Array. - Renames Variant::REAL to Variant::FLOAT for consistency. Packed arrays are for storing large amount of data and creating stuff like meshes, buffers. textures, etc. Forcing them to be 64 is a huge waste of memory. That said, many users requested the ability to have 64 bits packed arrays for their games, so this is just an optional added type. For Variant, the float datatype is always 64 bits, and exposed as `float`. We still have `real_t` which is the datatype that can change from 32 to 64 bits depending on a compile flag (not entirely working right now, but that's the idea). It affects math related datatypes and code only. Neither Variant nor PackedArray make use of real_t, which is only intended for math precision, so the term is removed from there to keep only float.
* 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.
* Properly expose PhysicsServer methodsLATRio2019-04-301-2/+4
|
* Add -Wshadow=local to warnings and fix reported issues.marxin2019-02-201-3/+3
| | | | Fixes #25316.
* Add a minimum treshold for acquiring rest contacts to avoid numerical ↵Juan Linietsky2019-02-161-0/+2
| | | | precision issues. Fixes #25074
* Update copyright statements to 2019Rémi Verschelde2019-01-011-2/+2
| | | | Happy new year to the wonderful Godot community!
* Fix warnings about unhandled enum value in switch [-Wswitch]Rémi Verschelde2018-09-271-1/+0
| | | | | | | | | | | Fixes GCC 5 warnings of the form: core/io/http_client.cpp:288:9: warning: enumeration value 'STATUS_SSL_HANDSHAKE_ERROR' not handled in switch [-Wswitch] core/io/marshalls.cpp:806:9: warning: enumeration value 'AABB' not handled in switch [-Wswitch] Those can be trivial cases where adding a default fallback is the solution, or more complex issues/hidden bugs where missed values are actually meant to be handled.
* Make core/ includes absolute, remove subfolders from include pathRémi Verschelde2018-09-121-2/+2
| | | | | | 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.
* PhysicsServer: Add validity checks for shape query parametersRémi Verschelde2018-09-101-66/+8
| | | | Fixes #17439.
* Changes to ClippedCamera, RayCast,Raycast2D and 2D physics API to add ↵Juan Linietsky2018-08-211-12/+38
| | | | ability to choose between bodies and areas when colliding.
* Added ray / shape / point / motion / rest cast exclusion of area and or bodyAndrea Catania2018-08-211-15/+17
|
* Merge pull request #15643 from organicpencil/bullet_contact_impulseRémi Verschelde2018-07-261-0/+1
|\ | | | | Expose PhysicsDirectBodyState.get_contact_impulse
| * Expose PhysicsDirectBodyState.get_contact_impulseLee Pugh2018-01-121-0/+1
| |
* | Reduce unnecessary COW on Vector by make writing explicitHein-Pieter van Braam2018-07-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Modified RigidBody, PhysicsDirectBodyState, PhysicsServer, and their ↵Tiger Caldwell2018-07-241-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | -Fix disable_3d flagJuan Linietsky2018-07-211-0/+4
| | | | | | | | -Add extra flag optimize=[size,speed] to be able to prioritize size
* | added cylinder shape supportmuiroc2018-07-011-0/+1
| |
* | Expose methods area_set_area_monitor_callback and area_set_monitorable in ↵MrCdK2018-05-251-0/+2
| | | | | | | | PhysicsServer and Physics2DServer
* | Implemented interface for bullet joint motorsGeoffrey2018-03-161-0/+3
| |
* | Fixed physics server typoAndrea Catania2018-02-271-1/+1
| |
* | Added Physics state APIsAndrea Catania2018-02-161-0/+2
|/
* Bind many more properties to scriptsBojidar Marinov2018-01-121-0/+20
| | | | | | | Notable potentially breaking changes: - PROPERTY_USAGE_NOEDITOR is now PROPERTY_USAGE_STORAGE | PROPERTY_USAGE_NETWORK, without PROPERTY_USAGE_INTERNAL - Some properties were renamed, and sometimes even shadowed by new ones - New getter methods (some virtual) were added
* 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!
* Implemented physics linear and angular lockAndreaCatania2017-12-101-1/+7
|
* Merge pull request #12756 from Stratos695/masterRémi Verschelde2017-12-091-6/+1
|\ | | | | Allowing double-axis lock in RigidBody & KinematicBody (Fixes #12500)
| * Allow double-axis lock in RigidBody and KinematicBodyEric Rybicki2017-11-101-6/+1
| |
* | Made Vector::ptrw explicit for writing, compiler was sometimes using the ↵Juan Linietsky2017-11-251-2/+2
| | | | | | | | | | | | wrong function, leading to unnecesary copy on writes and reduced performance.
* | Removed type_mask and fixed some variable nameAndreaCatania2017-11-211-33/+14
| |
* | classref: Sync with current sourceRémi Verschelde2017-11-131-0/+1
|/ | | | [ci skip]
* Rewritten kinematic systemAndreaCatania2017-11-071-0/+3
|
* Merge pull request #12262 from AndreaCatania/pplugJuan Linietsky2017-11-031-0/+67
|\ | | | | Physics server plug
| * Implemented physics plugAndreaCatania2017-11-041-0/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Moved init_physics Implemented physics 2D plug Fix clang Fix clang Fix static check Fix clang Fix static check Moved physics server initialization Moved physics server settings initialization
* | Bind unbound enums, rearrange some by valuePoommetee Ketson2017-10-221-2/+2
|/
* Added new API to get body direct stateAndreaCatania2017-09-291-0/+2
|
* Rename pos to position in user facing methods and variablesletheed2017-09-201-6/+6
| | | | | | | | | | | 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.
* Fix enums bindingsMaxim Sheronov2017-09-131-0/+14
| | | | | Add missed bindings for enums Move some enums to class to have correct output of api.json
* Fix typo 'inetria' to 'inertia'Poommetee Ketson2017-09-011-1/+1
|
* Use HTTPS URL for Godot's website in the headersRémi Verschelde2017-08-271-1/+1
|
* ClassDB: Provide the enum name of integer constantsIgnacio Etcheverry2017-08-201-129/+130
|
* Synchronize parameter names in definition and declarationTwistedTwigleg2017-08-161-8/+8
| | | | Fixes #10244.
* Removes type information from method bindsIgnacio Etcheverry2017-08-101-9/+9
|
* Makes all Godot API's methods Lower CaseIndah Sylvia2017-08-071-8/+8
|
* Refactor layer_mask to collision_layerPoommetee Ketson2017-06-141-15/+15
|
* Add "Godot Engine contributors" copyright lineRémi Verschelde2017-04-081-0/+1
|
* A Whole New World (clang-format edition)Rémi Verschelde2017-03-051-409/+358
| | | | | | | | | | | | | | | | | | | | | | | | 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
* Rename the _MD macro to D_METHODHein-Pieter van Braam2017-02-131-172/+172
| | | | | | This new name also makes its purpose a little clearer This is a step towards fixing #56
* Style: Fix statements ending with ';;'Rémi Verschelde2017-01-161-1/+1
|
* Style: Fix whole-line commented codeRémi Verschelde2017-01-141-8/+8
| | | | | 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.