Commit graph

102 commits

Author SHA1 Message Date
John Teasdale
7323f7998b Bullet picking will now ignore objects without input_ray_pickable 2018-08-19 13:14:12 -07:00
Juan Linietsky
14fd797c53
Merge pull request #20381 from AndreaCatania/phymat_2
Improved Physics material
2018-08-07 15:31:26 -03:00
Andrea Catania
5e65e28eed Removed physics material combination mode. Added rough and absorbent parameter to material. Fixed 'change' signal connection 2018-08-07 19:38:04 +02:00
Andrea Catania
b469267d94 Fixed SoftBody pinned point offset calculation 2018-08-03 17:44:09 +02:00
Rémi Verschelde
ef93fec789
Merge pull request #15643 from organicpencil/bullet_contact_impulse
Expose PhysicsDirectBodyState.get_contact_impulse
2018-07-26 15:36:37 +02:00
Hein-Pieter van Braam
0e29f7974b Reduce unnecessary COW on Vector by make writing explicit
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-26 00:54:16 +02:00
Tiger Caldwell
40c7716586 Modified RigidBody, PhysicsDirectBodyState, PhysicsServer, and their 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-24 05:00:56 -04:00
AndreaCatania
17ebbfb56d Implemented Soft body
- Soft Body Physics node
- Soft Body Rendering
- Soft body Editor
- Soft body importer
2018-07-23 20:50:23 +02:00
Juan Linietsky
1ad20dc2f1
Merge pull request #12403 from AndreaCatania/phymat
Physics material
2018-07-23 07:37:03 -03:00
Juan Linietsky
2b9902db06 -Fix disable_3d flag
-Add extra flag optimize=[size,speed] to be able to prioritize size
2018-07-21 17:26:49 -03:00
muiroc
0a36e974da added cylinder shape support 2018-07-01 11:16:54 +02:00
Rémi Verschelde
3334209a73 SCons: Pass env to modules can_build method
This allows to disable modules based on the environment,
in particular `env[tools]` which tells us if we are
building the editor or not.
2018-05-30 19:11:36 +02:00
Andrea Catania
97a1011ba1 Improved kinematic test_body_motion code 2018-05-27 14:55:52 +02:00
AndreaCatania
5f66734d2d Implemented physics material
Hidden a function

Fixed travis static check
2018-05-11 03:23:09 +02:00
Rémi Verschelde
de9683b605
Merge pull request #17559 from simedis/joint_motors
Implemented interface for bullet linear motors
2018-05-08 10:23:41 +02:00
AndreaCatania
9e57a07fb6 Implemented ragdoll
Implementing ragdoll

Implementing ragdoll

Implementing ragdoll

Implementing ragdoll

Implementing ragdoll

a

Implemented implicit hierarchy.

Improved

Added some physics properties

Added bone offset to preserve COM, partially fixed scaling

work in progress

WIP

wip

Implemented Joint Gizmos

Implemented pin joint joint

Implemented all joints
2018-05-07 21:03:16 +02:00
Rémi Verschelde
3018132244
Merge pull request #18204 from tagcup/quat_scale
Avoid converting Quat to Euler angles when not necessary.
2018-04-18 13:55:35 +02:00
tagcup
a5e0bb447c Avoid converting Quat to Euler angles when not necessary.
Also ensure that get_scale doesn't arbitrarlity change the signs of scales, ensuring that the combination of get_rotation and get_scale gives the correct basis.

Added various missing functions and constructors.

Should close #17968.
2018-04-14 15:53:25 -04:00
Andrea Catania
2cfa861222 Removed useless check 2018-04-12 11:37:36 +02:00
Andrea Catania
df2a626b49 Fixed wrong function call 2018-04-12 11:02:43 +02:00
Andrea Catania
f0abdf06ad
Rigidbody wake up when hitten by a kinematic body 2018-04-12 07:59:12 +02:00
Andrea Catania
45b778c7f8 Fixed area overlap cleaning 2018-04-09 09:33:29 +02:00
Rémi Verschelde
bdfa10fc8f
Merge pull request #17899 from AndreaCatania/area_cleaning
Fixed physics server area cleaning
2018-04-06 08:15:22 +02:00
Andrea Catania
776942981b Fixed physics server area cleaning 2018-04-06 07:48:30 +02:00
Rémi Verschelde
e1b9c98032
Merge pull request #17806 from Zylann/fix_heightmap_shape_size_check
Make heightmap shape usable in PhysicsServer
2018-04-05 13:29:57 +02:00
Andrea Catania
444b8471a3 Corrected physics query max result checking 2018-04-04 11:55:58 +02:00
Rémi Verschelde
e1fef9bd76
Merge pull request #17959 from AndreaCatania/kinfix2
Fixed kinematic sliding on trimesh
2018-04-04 11:21:49 +02:00
Andrea Catania
b050525072 Fixed kinematic sliding on trimesh 2018-04-04 10:49:10 +02:00
Rémi Verschelde
a7dd698d4d
Merge pull request #17900 from AndreaCatania/area_mon
physics area added monitorable check
2018-04-03 22:09:56 +02:00
Alexander Alekseev
b569251110 Fix of a possible memory leak: ConcavePolygonShapeBullet::setup was able to exit without releasing the 'shapeInterface' pointer. 2018-04-02 09:29:34 +03:00
Andrea Catania
fe768f4f00 physics area added monitorable check 2018-04-01 11:27:18 +02:00
Marc Gilleron
a66e1af168 Make heightmap shape usable from PhysicsServer
- Fixed bad size check
- Fixed bad member initialization
- Removed unused cell_size (Bullet expects us to use localScaling)
- Accept precomputed min/max height, will be calculated if not provided
2018-03-28 20:33:51 +02:00
Geoffrey
09c887f38e Implemented interface for bullet joint motors 2018-03-16 13:37:15 +01:00
Wilson E. Alvarez
e5ae9750ed Fixed leak in BulletPhysicsServer 2018-03-13 15:24:30 -04:00
Rémi Verschelde
3fa77b3172 doc: Remove status from hardcoded version string
It has no practical use case and just generates noise for each alpha, beta, etc.
2018-02-27 13:40:49 +01:00
Rémi Verschelde
4b9ab27dea
Merge pull request #17021 from AndreaCatania/kinfix
Fixed bullet kinematic char sliding
2018-02-27 11:40:11 +01:00
Andrea Catania
e1e78a51aa Implemented Bullet method omit forces 2018-02-27 08:41:17 +01:00
Andrea Catania
0e446f8aff Fixed kinematic char sliding 2018-02-25 21:05:14 +01:00
luz.paz
612ab4bbc6 Fix typos with codespell
Found via `codespell -q 3 --skip="./thirdparty,./editor/translations" -I ../godot-word-whitelist.txt`
Whitelist consists of:
```
ang
doubleclick
lod
nd
que
te
unselect
```
2018-02-21 19:46:06 +01:00
Rémi Verschelde
497a4e9e25
Merge pull request #16757 from AndreaCatania/kinpush
Improved kinematic body, Now can move rigid body
2018-02-20 15:41:10 +01:00
Andrea Catania
6ed392f47a Improved kinematic body 2D and 3D, Now can move rigid body 2018-02-20 12:43:47 +01:00
Rémi Verschelde
b2aeb02e7d
Merge pull request #16530 from AndreaCatania/rays
Improved ray shape (2D and 3D) by addiing the possibility to act as r…
2018-02-19 22:15:49 +01:00
Andrea Catania
ffc3ef8677 Improved ray shape (2D and 3D) by addiing the possibility to act as regular shape 2018-02-19 20:59:57 +01:00
Rémi Verschelde
be67f2e4ba
Merge pull request #16751 from AndreaCatania/moreAPIs
Added Physics state APIs
2018-02-19 20:22:18 +01:00
Rémi Verschelde
3c7a39b40c doc: Update version string in header 2018-02-19 10:46:33 +01:00
Andrea Catania
a930797c31 Added Physics state APIs 2018-02-16 17:48:07 +01:00
Rémi Verschelde
2a754be71a
Merge pull request #16681 from AndreaCatania/kin_t
Added return true o collide when no rusult is NULL
2018-02-14 08:28:19 +01:00
Andrea Catania
f48845428d Added return true o collide when no rusult is NULL 2018-02-14 08:18:48 +01:00
Rémi Verschelde
232e03e5e3
Merge pull request #16547 from Dar13/kinematic_gravity_fix
Fixes gravity calculation for kinematic bodies in Bullet
2018-02-14 08:14:38 +01:00
Neil Moore
5fb8a6a6c2 Fixes gravity calculation for kinematic bodies in Bullet 2018-02-13 19:14:10 -05:00