Commit graph

215 commits

Author SHA1 Message Date
Rémi Verschelde fc8ccd5b8c SCsub: Add python shebang as a hint for syntax highlighting
Also switch existing shebangs to "better" /usr/bin/env python.
2016-10-17 20:10:46 +02:00
Juan Linietsky 22d83bc9f6 Begining of GLES3 renderer:
-Most 2D drawing is implemented
-Missing shaders
-Missing all 3D
-Editor needs to be set on update always to be used, otherwise it does not refresh
-Large parts of editor not working
2016-10-03 21:35:16 +02:00
Fabio Alessandrelli 1d09c27ba4 Expose more 2D/3D physics options in project settings 2016-10-03 14:40:47 +02:00
Alex Piola ffdd9f16dd Fix for incorrect velocity report due to a typo.
Closes #5854
2016-07-24 12:53:07 +02:00
Rémi Verschelde f40f360a2c Remove unused variables (fourth pass) + dead code
Also fix a potential regression from 3fcb9b1ec1.
2016-07-08 16:47:55 +02:00
Rémi Verschelde c3bf11d4d4 Drop fully commented-out files
Part of #5272
2016-06-18 20:23:49 +02:00
Rémi Verschelde 80727b6896 Drop empty .cpp files for header-only classes
Part of #5272
2016-06-18 20:00:08 +02:00
Rémi Verschelde a7fc04626a Add missing license headers in our source files (#5255)
Also removes a couple wrong Godot headers from third-party source files.
2016-06-18 14:46:12 +02:00
Carter Anderson 7df5249779 Remove noisy print 2016-05-23 22:56:32 -07:00
Juan Linietsky 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
Bojidar Marinov 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
Hubert Jarosz 4a4f247914
remove trailing whitespace 2016-03-09 00:00:52 +01:00
Juan Linietsky d01f55a78e Merge pull request #2698 from Faless/add_area_fix
Fix bug in Body(2D)SW::add_area
2016-01-23 23:07:23 -03:00
Juan Linietsky cb9dfd5d28 avoid crash with empty concavepolygonshape, fixes #3169 2016-01-10 17:25:20 -03:00
Juan Linietsky 1aaf507ffb change intersect_ray function to discriminate pickable objects, fixes #3203 2016-01-10 15:54:57 -03:00
Juan Linietsky 27c47e09a1 skip the first integration in physics bodies, fixes #2213 2016-01-02 13:28:18 -03:00
George Marques 5be9ff7b67 Update copyright to 2016 in headers 2016-01-01 11:50:53 -02:00
Rémi Verschelde d1caf2f037 Remove bogus argument in body_get_node 2015-12-28 01:32:12 +01:00
Ovnuniarchos 89efebbf56 New and corrected are override modes. 2015-12-14 02:56:49 +01:00
Juan Linietsky ff936c6b2e Merge pull request #2868 from akien-mga/pr-fix-can-move-to
Fix can_move_to and rename it for more clarity
2015-12-08 17:09:47 -03:00
Ovnuniarchos 43b2c9c7a4 Areas now calculate their dampenings the same way as their gravity. 2015-12-08 18:45:14 +01:00
Rémi Verschelde 9457211f8f Fix wrong index being used to populate r_results
Regression from f33d9da.
2015-12-04 09:31:01 +01:00
Fabio Alessandrelli 1231c795de Fix Body (and Body2D) add_area / remove_area when area have multiple shapes 2015-12-02 11:30:48 +01:00
Rémi Verschelde f33d9dab5b Fix can_move_to and rename it for more clarity
Fixes #2416.
The KinematicBody::can_move_to function was likely designed for two behaviours:
 - discrete: check if the body can "teleport" to the destination
 - continuous: check if the direct path to the destination is valid
The continuous behaviour was however not implemented, and the discrete behaviour was broken too due to a wrong call to intersect_shape.

The discrete behaviour has thus been fixed and the function renamed to can_teleport_to for more clarity.
2015-11-22 14:14:07 +01:00
Rémi Verschelde 399b1b0474 Cosmetic fixes to SCons buildsystem
- Removed trailing spaces
- Made sure all indentation is done using tabs (fixes #39)
- Potentially fixed an identation issue for openssl check
2015-11-01 20:53:26 +01:00
Juan Linietsky b217e1417a Merge pull request #2479 from firefly2442/cppcheck-unusedvars
ran cppcheck, found unused variables
2015-10-17 10:25:36 -03:00
eska 375a7a727f Fix 3D Area mask matching 2015-10-10 02:33:26 +02:00
reduz aad2bbdb6f newline fixes 2015-10-08 15:00:40 -03:00
Juan Linietsky 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
firefly2442 afbb6c064c ran cppcheck, found unused variables 2015-09-16 15:35:30 -05:00
Juan Linietsky b0aa49accb merged some stuff for okam 2015-09-03 23:24:55 -03:00
Juan Linietsky 2d8866574d Added gravity scale, and linear/angular damp override to 3D physics. 2015-08-30 18:57:17 -03:00
Juan Linietsky 89300b70e7 added ability for Area (3D) to detect other areas 2015-06-12 15:52:21 -03:00
Fabio Alessandrelli 473c7222f5 Calculate gravity based on distance from body to gravity point 2015-05-18 01:30:43 +00:00
Juan Linietsky bbe9a37f1d sleeping property now should work properly, fixes #1892 2015-05-16 17:54:36 -03:00
ehriche 897a1aade5 optional formal changes 2015-05-06 01:22:31 +02:00
ehriche 670d77813f PhysicsServerSW::body_is_shape_set_as_trigger - missing return statement 2015-05-06 00:41:41 +02:00
Juan Linietsky 4804462ee0 -Fixes from source code analyzizer, closes #1768 2015-05-01 10:44:08 -03:00
Juan Linietsky 3bcb930e8a properly wake up bodies when a parameter changes, fixes #1740 2015-04-26 16:20:00 -03:00
Juan Linietsky 81f36b768d fixes crash related to empty concavecollisionshape, fixes #1709 2015-04-26 13:03:01 -03:00
Juan Linietsky f92a1fd646 Merge pull request #1691 from Faless/area_combine_2d
Implement Area2D space_override_mode = COMBINE
2015-04-18 14:44:59 -03:00
Juan Linietsky fdaa2920eb Updated copyright year in all headers 2015-04-18 14:38:54 -03:00
Fabio Alessandrelli e1bfbcfd42 Fix operator definition for AreaCMP 2015-04-14 16:46:52 +00:00
Fabio Alessandrelli 600bae34bd Re-sort Area array during integration step 2015-03-24 18:46:26 +00:00
Fabio Alessandrelli 18a1403fcf Implement combine mode for area 2015-03-24 18:46:26 +00:00
Fabio Alessandrelli 4b3b5eba86 Use Vector for storing areas 2015-03-24 18:46:26 +00:00
Juan Linietsky e9f94ce8d2 fix area center of gravity 2015-03-22 15:11:36 -03:00
Juan Linietsky c2d975582c Merge pull request #1446 from UsernameIsAReservedWord/fixes_kinematicbody_move_crash
should fixes #1284 (KinematicBody .move() crash)
2015-03-22 14:56:30 -03:00
Juan Linietsky c6c72a3c37 input events on Area2D is now supported
also added a demo showing how this works
2015-03-22 01:46:18 -03:00
UsernameIsAReservedWord 69cf996ce6 should fixes #1284
I could reproduce the crash described in #1284 only with 32bits versions of godot.

The test scene contains a Plane collision shape, and a kinematicsbody with a Sphere collision shape.
 
The crash occurs into `CollisionSolverSW::solve_distance_plane()` on line 299 when `p_shape_A` is a `PlaneShapeSW` object and when `p_shape_B` is a `MotionShapeSW` object, because `int support_count;` is not initialized by default, and because `MotionShapeSW::get_supports()` does not change `support_count` once passed as referenced parameter, and if the default value of `support_count` is greater than the length of `supports[16]`.

I don't know if it is the good way to fix it because i'm not skilled ennough with the physics server inner working, but this fix prevents the crash and the test-scene seems to work correctly.
2015-02-26 19:27:32 +01:00
Juan Linietsky f75ae815d5 -CCD in 3D physics was not working (code was not even there!) re-added, fixes 1067 2015-01-05 23:00:35 -03:00
Juan Linietsky 8c4dd8de39 -WIP to add proper key swapping according to keyboard layout
-fix with non working removal of collision exception in 3D physics
2015-01-04 21:16:40 -03:00
Juan Linietsky c79be979d4 Batch of Bugfixes
-=-=-=-=-=-=-=-=-

-Fixed Export UV XForm (should work now). #923
-Fixed enforcement of limits in property editor. #919
-Fixed long-standing bug of export editings in script inheritance. #914, #859, #756
-Fixed horrible error reporting in shader language. #912
-Added kinematic collision with plane (please test well). #911
-Fixed double animation track insert when using 2D rigs. #904
-VKey updates offset parameter in sprite edition. #901
-Do not allow anymore a script to preload itself. (does not fix #899, but narrows it down)
-Avoid connection editor from overriding selected text. #897
-Fixed timer autostart. #876
-Fixed collision layers in 3D physics. #872
-Improved operators in shader #857
-Fixed ambient lighting bug #834
-Avoid editor from processing gamepad input #813
-Added not keyword #752

Please test!
2014-12-07 02:04:20 -03:00
Juan Linietsky a84ba9c853 Collada
-=-=-=-

-Fixed some DAE import & export bugs
-Changed Collada exporter to use the mesh loops API
-Added tangent export to Collada exporter
-Added triangulation option to Collada exporter
-Changed a little how normalmaps are handled in shader. Not sure if it's working properly, be careful.
-Fixed some strange bug with kinematic bodies #776
-Fix release compilaiton issues #782
2014-10-14 01:01:25 -03:00
Juan Linietsky af4a97bef9 missing fils from yesterday comit.
must have made some mistake with git,
not sure why they were not sent..
2014-10-03 08:58:41 -03:00
Juan Linietsky b24fe3dd20 Huge Amount of BugFix
-=-=-=-=-=-=-=-=-=-=-

-Fixes to Collada Exporter (avoid crash situtions)
-Fixed to Collada Importer (Fixed Animation Optimizer Bugs)
-Fixes to RigidBody/RigidBody2D body_enter/body_exit, was buggy
-Fixed ability for RigidBody/RigidBody2D to get contacts reported and bodyin/out in Kinematic mode.
-Added proper trigger support for 3D Physics shapes
-Changed proper value for Z-Offset in OmniLight
-Fixed spot attenuation bug in SpotLight
-Fixed some 3D and 2D spatial soudn bugs related to distance attenuation.
-Fixed bugs in EventPlayer (channels were muted by default)
-Fix in ButtonGroup (get nodes in group are now returned in order)
-Fixed Linear->SRGB Conversion, previous algo sucked, new algo works OK
-Changed SRGB->Linear conversion to use hardware if supported, improves texture quality a lot
-Fixed options for Y-Fov and X-Fov in camera, should be more intuitive.
-Fixed bugs related to viewports and transparency

Huge Amount of New Stuff:
-=-=-=-=-=-=-=-==-=-=-=-

-Ability to manually advance an AnimationPlayer that is inactive (with advance() function)
-More work in WinRT platform
-Added XY normalmap support, imports on this format by default. Reduces normlmap size and enables much nice compression using LATC
-Added Anisotropic filter support to textures, can be specified on import
-Added support for Non-Square, Isometric and Hexagonal tilemaps in TileMap.
-Added Isometric Dungeon demo.
-Added simple hexagonal map demo.
-Added Truck-Town demo. Shows how most types of joints and vehicles are used. Please somebody make a nicer town, this one is too hardcore.
-Added an Object-Picking API to both RigidBody and Area! (and relevant demo)
2014-10-03 00:10:51 -03:00
Juan Linietsky 549d344f0f Fixing Issues...
- #672 (default user:// in $HOME/.godot/app_userdata (linux/osx) and $APPDATA/Godot/app_userdata (Windows)
- #676 (draw both tiles and octants in order from top to bottom, left to right )
- #686 (unicode escape sequences work now)
- #702 (was not a bug, but a test was added to see if bodies went too far away)
2014-09-19 18:39:50 -03:00
Juan Linietsky e0ce701c8c More Bugfix...
-=-=-=-=-=-==

-Fix bug in camera follow script
-Fix negate operator not working in shader language
-Fix uninitialized pointer in raycast query API
2014-09-17 23:23:42 -03:00
Juan Linietsky 8cab401d08 3D Physics Rework, Other Stuff
-=-=-=-=-=-=-=-=-=-=-=-=-=-

3D Physics:
-Fixed "Bounce" parameter in 3D
-Fixed bug affecting Area (sometims it would not detect properly)
-Vehicle Body has seen heavy work
-Added Query API for doing space queries in 3D. Needs some docs though.
-Added JOINTS! Adapted Bullet Joints: and created easy gizmos for setting them up:
   -PinJoint
   -HingeJoint (with motor)
   -SliderJoint
   -ConeTwistJoint
   -Generic6DOFJoint
-Added OBJECT PICKING! based on the new query API. Any physics object now (Area or Body) has the following signals and virtual functions:
    -input_event (mouse or multitouch input over the body)
    -mouse_enter (mouse entered the body area)
    -mouse_exit (mouse exited body area)
   For Area it needs to be activated manually, as it isn't by default (ray goes thru).

Other:

-Begun working on Windows 8 (RT) port. Compiles but does not work yet.
-Added TheoraPlayer library for improved to-texture and portable video support.
-Fixed a few bugs in the renderer, collada importer, collada exporter, etc.
2014-09-15 11:33:30 -03:00
Juan Linietsky 1a2cb755e2 3D Physics and Other Stuff
-=-=-=-=-=-=-=-=-=-=-=-=-=

-New Vehicle (Based on Bullet's RaycastVehicle) - Vehiclebody/VehicleWheel. Demo will come soon, old vehicle (CarBody) will go away soon too.
-A lot of fixes to the 3D physics engine
-Added KinematicBody with demo
-Fixed the space query API for 2D (demo will come soon). 3D is WIP.
-Fixed long-standing bug with body_enter/body_exit for Area and Area2D
-Performance variables now includes physics (active bodies, collision pairs and islands)
-Ability to see what's inside of instanced scenes!
-Fixed Blend Shapes (no bs+skeleton yet)
-Added an Android JavaClassWrapper singleton for using Android native classes directly from GDScript. This is very Alpha!
2014-09-02 23:13:40 -03:00
Juan Linietsky 2ee4ac183b Little Bits
-=-=-=-=-=-

-Fixed small bugs all around
-Added ability to show/hide entire sections of the spatial (3D) tree
-WIP new vehicle (not ready yet) based on Bullet
2014-08-14 10:31:38 -03:00
Juan Linietsky b324ff7ea5 A bit of everything:
-IMA-ADPCM support for samples, this means that sound effects can be compressed and use 4 timess less RAM.
-New 3D import workflow based on Wavefront OBJ. Import single objects as mesh resources instead of full scenes. Many people prefers to work this way. Just like the rest of the imported resources, these are updated in realtime if modified externally.
-Mesh resources now support naming surfaces. This helps reimporting to identify which user-created materials must be kept.
-Several fixes and improvements to SurfaceTool.
-Anti Aliasing added to WorldEnvironment effects (using FXAA)
-2D Physics bodies (RigidBody, KinematicBody, etc), Raycasts, Tilemap, etc support collision layers. This makes easy to group which objects collide against which.
-2D Trigger shapes can now also trigger collision reporting in other 2D bodies (it used to be in Area2D before)
-Viewport render target textures can now be filtered.
-Few fixes in GDscript make it easier to work with static functions and class members.
-Several and many bugfixes.
2014-05-14 01:22:15 -03:00
marynate 9593e9ddae Export linear/angular velocity sleep threshold;Change default linear velocity sleep threshold to 0.1;Fixed type treshold 2014-02-27 17:28:40 +08:00
Juan Linietsky d7d65fa2f2 -improved physics ccd
-html5 exporter works again
-disable repeat on image loader by default
-can change shape offset en tileset, texture offset was broken
2014-02-19 11:57:14 -03:00
Juan Linietsky 0b806ee0fc GODOT IS OPEN SOURCE 2014-02-09 22:10:30 -03:00