Commit graph

664 commits

Author SHA1 Message Date
luz.paz 08bde5b2de Misc. typos
Found via `codespell -q 3 -I ../godot-word-whitelist.txt --skip="./thirdparty,*.po"`
2018-09-12 21:39:17 -04:00
Rémi Verschelde 277b24dfb7 Make core/ includes absolute, remove subfolders from include path
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-09-12 09:52:22 +02:00
Hugo Locurcio 3f87f9b79c
Update Light properties in the inspector when dragging their gizmos 2018-09-07 22:59:55 +02:00
Hugo Locurcio d789cbeb6b
Tweak the Light instantiation error message and fix a typo 2018-09-07 22:36:39 +02:00
Juan Linietsky 74359a1d1e Add a function to force transform update, fixes #17628 2018-09-06 20:38:16 -03:00
Juan Linietsky 39e8aca1b7 Update FOV if edited in gizmo, fixes #16400 2018-09-06 16:22:34 -03:00
Rémi Verschelde 8804eb8c06
Merge pull request #21707 from JFonS/fix_instanced_selection
Fix selection of instanced scenes in 3D
2018-09-05 18:11:56 +02:00
Rémi Verschelde 5fe01d4cfc Move ParticlesMaterial code to its own resource file
It's shared by both 2D and 3D particles (+ CPU ones), so it makes sense
to have as a common resource. It also allowed to disable compilation of
Particles (3D) when using 'disable_3d'.

Also cleaned up includes in SpatialEditorGizmos and some other places,
as well as dropped dead code in material_editor_plugin.cpp.
2018-09-04 11:32:56 +02:00
JFonS 4a412943d4 Fix selection of instanced scenes in 3D 2018-09-02 22:31:03 +02:00
Rémi Verschelde 60570a5e60 PhysicsBody: Don't create PhysicsMaterial override for default friction/bounce
And don't save physics_material_override if null.
2018-09-02 15:08:43 +02:00
Kelly Thomas 1dc8e7c05f Improve ClassDB information for some some signal parameters 2018-09-01 18:05:51 +08:00
Rémi Verschelde 9eb4d4ab2d Add missing copyright headers 2018-08-29 22:41:17 +02:00
Juan Linietsky cf834a22dc Ported CPU particles to 2D 2018-08-29 16:48:55 -03:00
Rémi Verschelde 060988408b Physics: Properly obsolete friction and bounce properties
Without this change any new PhysicsBody would show deprecation warnings
due to default values for friction and bounce being defined.

It also enforced a physics material override even when using default
values.
2018-08-29 18:44:42 +02:00
Yuri Chornoivan 06e73522dc Fix vformat(), minor typos and word puzzles 2018-08-29 11:50:39 +03:00
Webster Sheets c522fe05e0 AtlasTexture fixes, part 2. 2018-08-27 15:24:56 -04:00
Rémi Verschelde 67b0d3c2dc Particles: Allow speed_scale at 0 in property hint, equivalent to pause
Supersedes and closes #21193.
2018-08-24 18:11:35 +02:00
Rémi Verschelde 77185aaf21
Merge pull request #21049 from AndreaCatania/joints
Improved 6DOF joint implementation
2018-08-24 17:10:54 +02:00
Rémi Verschelde 52466d57e9 Make some debug prints verbose-only, remove others 2018-08-24 14:59:01 +02:00
Marcelo Fernandez f344763b58 Add missing BIND_ENUM_CONSTANT to ClippedCamera 2018-08-23 13:53:05 -03:00
Juan Linietsky a1b594c2fc Switched AnimatedTexture to a readers-writers lock, solves a race condition and fixes #20221 2018-08-23 13:28:36 -03:00
Chaosus 27731a86d2 Restrict set_pitch_scale to positive scales for AudioStreamPlayer*
Fixes #20459.

Co-authored-by: Tiago José Sousa Magalhães <crakylps@gmail.com>
2018-08-22 00:11:53 +02:00
Juan Linietsky ee07fb5ebe Changes to ClippedCamera, RayCast,Raycast2D and 2D physics API to add ability to choose between bodies and areas when colliding. 2018-08-21 15:31:23 -03:00
Juan Linietsky 44d75e3b6d
Merge pull request #21266 from AndreaCatania/master
Added area / body collision exception in raycast
2018-08-21 14:26:19 -03:00
Andrea Catania 0b98834b77 Added ray / shape / point / motion / rest cast exclusion of area and or body 2018-08-21 18:51:08 +02:00
Juan Linietsky e20864c340 Clipped camera implementation, a camera that avoids going into geometry. 2018-08-21 11:48:48 -03:00
Juan Linietsky c1bd768ca2
Merge pull request #18822 from QbieShay/master
Added spring arm node
2018-08-20 14:21:04 -03:00
Juan Linietsky c7e4527a88 Massive rewrite to AnimationTree. Many APIs changed in order to:
-Reuse resources
-Expose properties in AnimationTree
2018-08-20 13:39:16 -03:00
Andrea Catania 0010d9c82a Added ray shape and move_and_slide with snapping on 3D.
Added stop_on_slope on 2d part
2018-08-19 13:45:23 +02:00
Andrea Catania 9826456f2e Improved move_and_slide function to stay on slope and fall on steep slope 2018-08-18 15:11:51 +02:00
QbieShay bb14ef5623 added spring arm node. 2018-08-18 14:34:42 +02:00
Andrea Catania b5480634c3 Added possibility to create joints with only one body 2018-08-16 08:23:08 +02:00
oisincar b684116b60 Expose PhysicalBone::get_bone_id() to c#/gdscript 2018-08-12 19:29:51 +01:00
Juan Linietsky 52e6f1f25c
Merge pull request #20072 from RandomShaper/fix-camera-offsets
Fix camera offsets not applied always
2018-08-10 16:24:39 -03:00
Juan Linietsky c02fb271fd apply a threshold for floor angle, fixes #16037, fixes #15632 2018-08-10 13:07:52 -03:00
JFonS 59fd18ab1a New gizmo structure and new gizmo disabling menu 2018-08-09 20:58:39 +02: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
Juan Linietsky 254eb46de3 Several improvements to inspector.
-Added optional horizontal/vertical modes for vector editing (default false for vec2, true for vec3)
-Some clean ups with fonts and styles
2018-08-07 12:22:46 -03:00
Juan Linietsky 5b70ad9d34 Respect process order for out of order skeleton bones (fixes GLTF2 import issues). 2018-08-06 22:35:09 -03:00
Juan Linietsky 7c712a25bc
Merge pull request #18699 from AndreaCatania/ik
Inverse kinematic
2018-08-04 10:45:14 -03:00
AndreaCatania b7e66188df Implemented IK 2018-08-04 11:25:07 +02:00
Andrea Catania b469267d94 Fixed SoftBody pinned point offset calculation 2018-08-03 17:44:09 +02:00
Max Hilbrunner 3f01f40e91
Merge pull request #20550 from AndreaCatania/soft_fix
Soft Body - Pin Point fix, Material fix
2018-07-30 17:01:25 +02:00
Juan Linietsky aff57a613b Add extra functions to toggle bits in visualinstance and camera, same as physics. Helps with #6685 2018-07-29 20:05:16 -03:00
Andrea Catania 7949ba771b SoftBody add MeshInstance Material correctly 2018-07-29 19:36:32 +02:00
Andrea Catania 45160f0c0d Fixed Softbody pin point 2018-07-28 20:38:20 +02:00
Rémi Verschelde 12254594ac Fix PhysicsBody build with deprecated=no
Fixes #20483.
2018-07-27 15:34:58 +02:00
Juan Linietsky 6a5aec3644 Rename flag to better name 2018-07-27 08:59:18 -03:00
Rémi Verschelde 5c8919aac6
Merge pull request #18955 from tagcup/fix_set_scale
Removed incorrect Basis::set_scale().
2018-07-26 10:37:03 +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
Juan Linietsky dc976cac57
Merge pull request #12678 from AndreaCatania/soft
Soft body
2018-07-23 16:04:32 -03: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 ec85fd554b Fix issues with CPUParticles and related conversion from Particles. Closes #20126 2018-07-23 12:28:50 -03:00
Juan Linietsky 1ad20dc2f1
Merge pull request #12403 from AndreaCatania/phymat
Physics material
2018-07-23 07:37:03 -03:00
Juan Linietsky 43dc050947 Several improvements to editor inspector usability and style 2018-07-18 19:37:41 -03:00
Juan Linietsky d1550b4a9b Ability to disable scale in nodes, closes #19927 2018-07-18 13:48:09 -03:00
Rémi Verschelde 7c9f7452f4 Style: Format code with clang-format 6.0.1 2018-07-18 16:27:03 +02:00
Juan Linietsky 063a22851a -Added support for raycast in KinematicBody2D
-Added support for snapping in KinematicBody2D
2018-07-16 20:04:07 -03:00
Marcelo Fernandez 087329074d Improved stream paused fade code 2018-07-09 21:58:33 -03:00
Pedro J. Estébanez ec5c96dbe1 Fix camera offsets not applied always
Specifically, project/unproject methods weren't taking them into account. Frustum computation may be affected as well.

This commit considers them for the camera matrix at all times.
2018-07-09 21:07:15 +02:00
Juan Linietsky ea47359408 Add option to convert Particles to CPUParticles 2018-07-07 09:04:22 -03:00
Juan Linietsky 7dcaabaf19 Support for CPU based particles, which aids compatibility with OpenGL ES 2.0 2018-07-06 20:21:42 -03:00
Max Hilbrunner ed61bdd2ae
Merge pull request #19646 from chanon/fix-audiostream-cant-set-null-stream
Fix can't set AudioStreamPlayer stream to null
2018-07-05 04:16:47 +02:00
Max Hilbrunner 6d0ade54c0
Merge pull request #19205 from marcelofg55/audio_stream_pause
Pause AudioStreamPlayer when SceneTree pauses
2018-07-03 17:23:53 +02:00
Max Hilbrunner 585a185e89
Merge pull request #19246 from xemjeff/physics
Hinge Joint Inspector - Change range for motor target velocity and params bias values
2018-07-03 16:49:10 +02:00
Andrea Catania 008e8266bb Removed two skeleton parameter from compilation width no 3d 2018-07-02 07:35:43 +02:00
Rémi Verschelde 05cc7020c0
Merge pull request #19886 from AndreaCatania/no3d
Fixes #19845 no 3d Compilation issue
2018-07-01 13:39:14 +02:00
Andrea Catania 08009c75a2 Fixes #19845 no 3d Compilation issue 2018-07-01 12:39:24 +02:00
Andrea Catania 16cf262e34 Fixes #19648 Kinematic body move_and_slide compatibility issue 2018-07-01 11:38:13 +02:00
Juan Linietsky eeab3502d5 Changes to how node paths are selected from property, allowing setting a hint. 2018-06-27 20:50:25 -03:00
Bastiaan Olij c11735facf Fight off some error spam in the editor 2018-06-24 11:54:08 +10:00
chanon 2bdac0a5d9 fix can't set AudioStreamPlayer stream to null 2018-06-22 15:00:57 +07:00
Rémi Verschelde 2fabb81318 Fix property hint for ReflectionProbe extents 2018-06-16 09:28:54 +02:00
Rémi Verschelde 8efbe9ed3d
Merge pull request #19487 from JFonS/better_3d_select
Improve 3D selection
2018-06-13 18:49:35 +02:00
JFonS 9cd1c20f6a Polished 3D selection 2018-06-13 17:52:37 +02:00
clayjohn fafa197ca5 updated some particlematerial properties 2018-06-10 11:15:02 -07:00
Marcelo Fernandez c409fe0597 Pause AudioStreamPlayers when SceneTree pauses 2018-06-03 14:01:47 -03:00
Jeffs bd29fec042 Issues #19203 and #19204
- Hinge Joint Inspector:
Motor target velocity range changed from [0,4096] to [-200,200] to allow for negative velocity and a reasonable range.
Params bias now allows a zero value to prevent the bullet message of not supporting a non-zero bias.
2018-05-29 09:03:20 -04:00
Juan Linietsky c80ac06253
Merge pull request #18691 from Web-eWorks/atlasfixes
Fix Sprite3d using AtlasTexture... Again.
2018-05-27 12:55:42 -03:00
Bastiaan Olij 660bebec94 Check for 0 roll influence 2018-05-26 08:26:39 +10:00
danilo2205 dc639d334a Up vector implementation and OrientedPathFollow. 2018-05-20 19:51:56 -03:00
tagcup 1bba6eeeb9 Removed incorrect Basis::set_scale().
Also added a missing constructor in Basis, and fixed usage of inverse and affine inverse in Transform.
2018-05-17 19:39:04 -04:00
Juan Linietsky 4b5227ff77 -Ability to open resources in the same window
-Plenty of fixes and improvements to new inspector
-Fixes that were needed to make inspector work better
2018-05-17 18:03:05 -03:00
Juan Linietsky dfd1331690 Allow editing of some unbound properties when hinted (or no range hinted) 2018-05-16 09:13:41 -03:00
Juan Linietsky 005b69cf6e -New inspector.
-Changed UI resizing code, gained huge amount of speed.
-Reorganized timer sync to clean up behavior (sorry forgot commit this before)

-
2018-05-15 17:14:31 -03:00
Michael Alexsander Silva Dias 7f72d6476b Fixed some warnings found with Cppcheck. 2018-05-14 02:14:56 -03:00
Hein-Pieter van Braam 3cfb9df325
Revert "Use fake audio playing property in editor" 2018-05-13 21:37:08 +02:00
Hein-Pieter van Braam 24dbe5e310
Merge pull request #17367 from ShyRed/audio_playing_
Use fake audio playing property in editor
2018-05-13 21:35:44 +02:00
AndreaCatania 5f66734d2d Implemented physics material
Hidden a function

Fixed travis static check
2018-05-11 03:23:09 +02:00
Andrea Catania 5a0119f9e2 Improved API to active / deactive ragdoll 2018-05-10 21:05:00 +02:00
Marcelo Fernandez e64bbcc429 Fix some enums missing its bind 2018-05-08 21:14:31 -03:00
Webster Sheets 4b545e3105 Fix AtlasTexture usage in Sprite3D.
Changes as requested in b484d5c.
2018-05-08 11:22:56 -04: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
Juan Linietsky 6d46f73ec3
Merge pull request #11973 from AndreaCatania/ragdoll
Ragdoll - Physical bone node
2018-05-07 16:12:27 -03: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
Juan Linietsky b484d5c2d8
Revert "Fix Sprite3D's incorrect behavior when using AtlasTextures." 2018-05-07 15:44:27 -03:00
Rémi Verschelde 430e45c84a
Merge pull request #16359 from Noshyaar/convert
Particles: fix corrupted scene when saved after convert
2018-05-03 21:24:03 +02:00
Rémi Verschelde 76cc12d916
Merge pull request #18572 from bzztbomb/fix/project_local_ray_normal_virtual
Fix for ARVRCamera::project_local_ray_normal not getting called.
2018-05-03 21:06:59 +02:00