Age | Commit message (Collapse) | Author |
|
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.
|
|
Ensured consistency between RigidBody, PhysicsDirectBodyState, PhysicsServers and their 2D counterparts
|
|
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
|
|
|
|
- Soft Body Physics node
- Soft Body Rendering
- Soft body Editor
- Soft body importer
|
|
Physics material
|
|
-Add extra flag optimize=[size,speed] to be able to prioritize size
|
|
|
|
|
|
Hidden a function
Fixed travis static check
|
|
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).
|
|
Changed debug max distance to avoid overflow
|
|
|
|
Changed it to roughly sqrt(FLT_MAX), it's a little less to account for float inaccuracies.
Fixes #1835
|
|
Improved kinematic body, Now can move rigid body
|
|
|
|
Improved ray shape (2D and 3D) by addiing the possibility to act as r…
|
|
shape
|
|
Added Physics state APIs
|
|
|
|
|
|
attached to a joint with bullet physics bullet
Fixes #16424
|
|
|
|
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.
|
|
Happy new year to the wonderful Godot community!
|
|
|
|
Allowing double-axis lock in RigidBody & KinematicBody (Fixes #12500)
|
|
|
|
|
|
Fixes #12973.
|
|
|
|
others too
|
|
Rewritten kinematic system
|
|
Avoid bias over rotation in contact resolution
|
|
|
|
Fix inertia tensor update & Generic6DOFJoint & Simplify Basis::get_euler()
|
|
Fix joints collision exceptions, plus a bit more
|
|
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.
|
|
also a minor bugfix in the 3D Pinjoint.
|
|
Added new API to get body direct state
|
|
|
|
|
|
|
|
|
|
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.
|
|
|
|
implementation
|
|
Removed code that flips normal if facing away from test direction
|
|
Fix unused variable warnings
|
|
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.
|