Commit Graph

57 Commits

Author SHA1 Message Date
912131fe03 Merge pull request #20101 from panzergame/shape_margin
Expose bullet shape margin to UI.
2018-08-21 16:17:11 +02:00
d88d0d457d Fixes to move and slide and ray separation, implement separation in Godot physics 2018-08-20 17:31:55 -03:00
e5bfa98d0f Expose bullet shape margin to UI.
The margin value is exposed into the UI for shape ressource.
This value can be modified through set_margin and get from get_margin
or by using the property margin. Each time the margin is modified
the associated collision shape is recreated and the margin value is
used in ShapeBullet::prepare.
2018-08-16 16:58:15 +02:00
14fd797c53 Merge pull request #20381 from AndreaCatania/phymat_2
Improved Physics material
2018-08-07 15:31:26 -03:00
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
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
1ad20dc2f1 Merge pull request #12403 from AndreaCatania/phymat
Physics material
2018-07-23 07:37:03 -03:00
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
0a36e974da added cylinder shape support 2018-07-01 11:16:54 +02:00
5f66734d2d Implemented physics material
Hidden a function

Fixed travis static check
2018-05-11 03:23:09 +02:00
6ed392f47a Improved kinematic body 2D and 3D, Now can move rigid body 2018-02-20 12:43:47 +01:00
a42765dada Added physics API in order to enable/disable collisions between rigidbody attached to a joint with bullet physics bullet
Fixes #16424
2018-02-05 18:54:07 +01:00
08d4bfacaf Fix inconsistencies and typos in argument names 2018-02-01 16:47:20 +01:00
e4213e66b2 Add missing copyright headers and fix formatting
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-05 01:22:23 +01:00
b50a9114b1 Update copyright statements to 2018
Happy new year to the wonderful Godot community!
2018-01-01 14:40:47 +01:00
5dee44bbc1 Implemented physics linear and angular lock 2017-12-10 17:21:14 +01:00
bd5df84199 Allow double-axis lock in RigidBody and KinematicBody 2017-11-10 22:33:54 +01:00
10f879bf88 Rewritten kinematic system 2017-11-07 15:22:09 +01:00
24b3733f3b Merge pull request #10770 from RandomShaper/fix-joints
Fix joints collision exceptions, plus a bit more
2017-10-31 23:02:37 +01:00
8e9b99fe59 Merge pull request #11702 from AndreaCatania/bodyDS
Added new API to get body direct state
2017-10-09 11:01:36 +02:00
4537977d6d Renamed fixed_process to physics_process 2017-09-30 16:19:07 +02:00
c56c67db39 Added new API to get body direct state 2017-09-29 17:33:30 +02:00
5ad9be4c24 Rename pos to position in user facing methods and variables
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-20 13:11:10 +02:00
fbeb27b01d Remove joint freeing logic from physics servers
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-09 21:45:22 +02:00
adde89e8b1 -Added an optimization so physics shapes are configured later, speeds up grid map loading and editing 2017-09-03 14:54:15 -03:00
7ad14e7a3e Dead code tells no tales 2017-08-27 22:13:45 +02:00
bd282ff43f Use HTTPS URL for Godot's website in the headers 2017-08-27 14:16:55 +02:00
fe1c3349e5 Fix freeze on close of game using 2D physics introduced by #9832
Additionally, port the fix to 3D physics, just in case
2017-08-08 23:17:11 +03:00
5ae78fdf6a Makes all Godot API's methods Lower Case 2017-08-07 18:24:35 +07:00
7264716e86 Improve cleanup of physics constraints
Don't abort the loop when one is already released
Remove warning on already-released constraint
Clean up area's contraints as well
Clear the constraint data as well
Do the cleanup as soon as the space changes
2017-08-01 01:39:40 +02:00
bc1d58c50d Extend check for same space to all 2D/3D bodies/shapes 2017-07-25 04:45:01 +02:00
2e73be99d8 Lots of work on Audio & Physics engine:
-Added new 3D stream player node
-Added ability for Area to capture sound from streams
-Added small features in physics to be able to properly guess distance to areas for sound
-Fixed 3D CollisionObject so shapes are added the same as in 2D, directly from children
-Fixed KinematicBody API to make it the same as 2D.
2017-07-15 08:32:34 -03:00
2fd204c35e Refactor 'treshold' to 'threshold' 2017-07-08 22:24:56 +07:00
6c44fff508 Refactor layer_mask to collision_layer 2017-06-14 10:58:34 +07:00
df61dc4b2b Add "Godot Engine contributors" copyright line 2017-04-08 00:11:42 +02:00
debeee56f7 Fix typos in source code using codespell
From https://github.com/lucasdemarchi/codespell
2017-03-24 21:45:31 +01:00
5dbf1809c6 A Whole New World (clang-format edition)
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
2017-03-05 16:44:50 +01:00
eae94ba1c8 Use real_t as floating point type in physics code.
This is a continuation of an on-going work for 64-bit floating point builds, started in PR #7528. Covers physics, physics/joints and physics_2d code.

Also removed matrixToEulerXYZ function in favor of Basis::get_euler.
2017-02-13 17:42:02 -06:00
93ab45b6b5 Style: Fix whole-line commented code
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.
2017-01-14 14:52:23 +01:00
2e38b32e0f Fixed inertia tensor computation and center of mass 2017-01-09 00:13:54 +00:00
c7bc44d5ad Welcome in 2017, dear changelog reader!
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!
2017-01-01 22:03:33 +01:00
a75f896338 First version of Profiler
It is now possible to profile GDScript as well as some parts of Godot
internals.
2016-05-21 21:18:16 -03:00
f7c3d6329c Port collision and layer masks to 3D, fixes #1759
Raycasts now have type_mask and layer_mask. Areas - collision_mask and layer_mask. PhysicsBodies needed only collision_mask.
2016-04-09 22:11:12 +03:00
5be9ff7b67 Update copyright to 2016 in headers 2016-01-01 11:50:53 -02:00
d1caf2f037 Remove bogus argument in body_get_node 2015-12-28 01:32:12 +01:00
83d9a692be Ability to visually debug geometry visually:
-Visible 2D and 3D Shapes, Polygons, Tile collisions, etc.
-Visible Navmesh and Navpoly
-Visible collision contacts for 2D and 3D as a red point
-Customizable colors in project settings
2015-09-20 13:03:46 -03:00
89300b70e7 added ability for Area (3D) to detect other areas 2015-06-12 15:52:21 -03:00
670d77813f PhysicsServerSW::body_is_shape_set_as_trigger - missing return statement 2015-05-06 00:41:41 +02:00
3bcb930e8a properly wake up bodies when a parameter changes, fixes #1740 2015-04-26 16:20:00 -03:00
fdaa2920eb Updated copyright year in all headers 2015-04-18 14:38:54 -03:00