summaryrefslogtreecommitdiff
path: root/modules/bullet/rigid_body_bullet.cpp
AgeCommit message (Collapse)Author
2019-01-30Avoid inertia calculation for empty shape - BulletAndrea Catania
2019-01-28Fixed Rigidbody first frame center spawnAndrea Catania
2019-01-01Update copyright statements to 2019Rémi Verschelde
Happy new year to the wonderful Godot community!
2018-11-22Improved algorithm that check collisionAndrea Catania
2018-11-16Fix some undefined behaviour in Bullet module.Ibrahn Sahir
Nulling mainShape when it's deleted to avoid double free. Initialising vector in inertia calculation to work around bug in bullet.
2018-10-07Optimitzed area overlap checksAndrea Catania
2018-10-06Improved code that handles collision shapes, fixes #21945Andrea Catania
2018-09-28Fix warnings about wrong member initialization order [-Wreorder]Rémi Verschelde
Fixes the following GCC 5 warnings: ``` core/object.h:193:11: warning: 'MethodInfo::flags' will be initialized after [-Wreorder] core/object.h:192:15: warning: 'PropertyInfo MethodInfo::return_val' [-Wreorder] core/object.cpp:278:1: warning: when initialized here [-Wreorder] core/script_debugger_remote.h:97:6: warning: 'ScriptDebuggerRemote::max_cps' will be initialized after [-Wreorder] core/script_debugger_remote.h:91:6: warning: 'int ScriptDebuggerRemote::max_messages_per_frame' [-Wreorder] core/script_debugger_remote.cpp:1086:1: warning: when initialized here [-Wreorder] core/script_debugger_remote.h:98:6: warning: 'ScriptDebuggerRemote::char_count' will be initialized after [-Wreorder] core/script_debugger_remote.h:92:6: warning: 'int ScriptDebuggerRemote::n_messages_dropped' [-Wreorder] core/script_debugger_remote.cpp:1086:1: warning: when initialized here [-Wreorder] modules/bullet/area_bullet.h:102:7: warning: 'AreaBullet::isScratched' will be initialized after [-Wreorder] modules/bullet/area_bullet.h:92:39: warning: 'PhysicsServer::AreaSpaceOverrideMode AreaBullet::spOv_mode' [-Wreorder] modules/bullet/area_bullet.cpp:46:1: warning: when initialized here [-Wreorder] modules/bullet/collision_object_bullet.h:127:15: warning: 'CollisionObjectBullet::space' will be initialized after [-Wreorder] modules/bullet/collision_object_bullet.h:117:7: warning: 'CollisionObjectBullet::Type CollisionObjectBullet::type' [-Wreorder] modules/bullet/collision_object_bullet.cpp:67:1: warning: when initialized here [-Wreorder] modules/bullet/godot_ray_world_algorithm.h:48:7: warning: 'GodotRayWorldAlgorithm::m_ownManifol1d' will be initialized after [-Wreorder] modules/bullet/godot_ray_world_algorithm.h:46:33: warning: 'const btDiscreteDynamicsWorld* GodotRayWorldAlgorithm::m_world' [-Wreorder] modules/bullet/godot_ray_world_algorithm.cpp:50:1: warning: when initialized here [-Wreorder] modules/bullet/godot_result_callbacks.h:91:18: warning: 'GodotAllConvexResultCallback::m_exclude' will be initialized after [-Wreorder] modules/bullet/godot_result_callbacks.h:89:6: warning: 'int GodotAllConvexResultCallback::m_resultMax' [-Wreorder] modules/bullet/godot_result_callbacks.h:93:2: warning: when initialized here [-Wreorder] modules/bullet/godot_result_callbacks.h:142:18: warning: 'GodotAllContactResultCallback::m_exclude' will be initialized after [-Wreorder] modules/bullet/godot_result_callbacks.h:140:6: warning: 'int GodotAllContactResultCallback::m_resultMax' [-Wreorder] modules/bullet/godot_result_callbacks.h:147:2: warning: when initialized here [-Wreorder] modules/bullet/godot_result_callbacks.h:168:18: warning: 'GodotContactPairContactResultCallback::m_exclude' will be initialized after [-Wreorder] modules/bullet/godot_result_callbacks.h:166:6: warning: 'int GodotContactPairContactResultCallback::m_resultMax' [-Wreorder] modules/bullet/godot_result_callbacks.h:173:2: warning: when initialized here [-Wreorder] modules/bullet/godot_result_callbacks.h:195:18: warning: 'GodotRestInfoContactResultCallback::m_exclude' will be initialized after [-Wreorder] modules/bullet/godot_result_callbacks.h:191:7: warning: 'bool GodotRestInfoContactResultCallback::m_collided' [-Wreorder] modules/bullet/godot_result_callbacks.h:199:2: warning: when initialized here [-Wreorder] modules/bullet/rigid_body_bullet.h:200:9: warning: 'RigidBodyBullet::gravity_scale' will be initialized after [-Wreorder] modules/bullet/rigid_body_bullet.h:199:9: warning: 'real_t RigidBodyBullet::mass' [-Wreorder] modules/bullet/rigid_body_bullet.cpp:258:1: warning: when initialized here [-Wreorder] modules/bullet/rigid_body_bullet.h:222:28: warning: 'RigidBodyBullet::force_integration_callback' will be initialized after [-Wreorder] modules/bullet/rigid_body_bullet.h:219:7: warning: 'bool RigidBodyBullet::isTransformChanged' [-Wreorder] modules/bullet/rigid_body_bullet.cpp:258:1: warning: when initialized here [-Wreorder] modules/bullet/rigid_body_bullet.h:220:7: warning: 'RigidBodyBullet::previousActiveState' will be initialized after [-Wreorder] modules/bullet/rigid_body_bullet.h:208:6: warning: 'int RigidBodyBullet::maxCollisionsDetection' [-Wreorder] modules/bullet/rigid_body_bullet.cpp:258:1: warning: when initialized here [-Wreorder] modules/bullet/soft_body_bullet.h:69:9: warning: 'SoftBodyBullet::total_mass' will be initialized after [-Wreorder] modules/bullet/soft_body_bullet.h:68:6: warning: 'int SoftBodyBullet::simulation_precision' [-Wreorder] modules/bullet/soft_body_bullet.cpp:38:1: warning: when initialized here [-Wreorder] modules/bullet/soft_body_bullet.h:76:9: warning: 'SoftBodyBullet::drag_coefficient' will be initialized after [-Wreorder] modules/bullet/soft_body_bullet.h:61:14: warning: 'btSoftBody* SoftBodyBullet::bt_soft_body' [-Wreorder] modules/bullet/soft_body_bullet.cpp:38:1: warning: when initialized here [-Wreorder] modules/bullet/space_bullet.h:97:22: warning: 'SpaceBullet::solver' will be initialized after [-Wreorder] modules/bullet/space_bullet.h:95:35: warning: 'btDefaultCollisionConfiguration* SpaceBullet::collisionConfiguration' [-Wreorder] modules/bullet/space_bullet.cpp:333:1: warning: when initialized here [-Wreorder] modules/bullet/space_bullet.h:101:23: warning: 'SpaceBullet::soft_body_world_info' will be initialized after [-Wreorder] modules/bullet/space_bullet.h:99:23: warning: 'btGhostPairCallback* SpaceBullet::ghostPairCallback' [-Wreorder] modules/bullet/space_bullet.cpp:333:1: warning: when initialized here [-Wreorder] modules/gdnative/nativescript/nativescript.h:79:13: warning: 'NativeScriptDesc::base_native_type' will be initialized after [-Wreorder] modules/gdnative/nativescript/nativescript.h:73:9: warning: 'String NativeScriptDesc::documentation' [-Wreorder] modules/gdnative/nativescript/nativescript.h:88:9: warning: when initialized here [-Wreorder] modules/gdscript/gdscript.h:296:6: warning: 'GDScriptWarning::line' will be initialized after [-Wreorder] modules/gdscript/gdscript.h:294:4: warning: 'GDScriptWarning::Code GDScriptWarning::code' [-Wreorder] modules/gdscript/gdscript.h:303:2: warning: when initialized here [-Wreorder] scene/3d/physics_body.h:544:7: warning: 'PhysicalBone::simulate_physics' will be initialized after [-Wreorder] scene/3d/physics_body.h:543:7: warning: 'bool PhysicalBone::_internal_static_body' [-Wreorder] scene/3d/physics_body.cpp:2502:1: warning: when initialized here [-Wreorder] scene/3d/physics_body.h:546:6: warning: 'PhysicalBone::bone_id' will be initialized after [-Wreorder] scene/3d/physics_body.h:539:12: warning: 'Skeleton* PhysicalBone::parent_skeleton' [-Wreorder] scene/3d/physics_body.cpp:2502:1: warning: when initialized here [-Wreorder] scene/3d/spring_arm.h:44:11: warning: 'SpringArm::mask' will be initialized after [-Wreorder] scene/3d/spring_arm.h:43:8: warning: 'float SpringArm::current_spring_length' [-Wreorder] scene/3d/spring_arm.cpp:37:1: warning: when initialized here [-Wreorder] scene/animation/skeleton_ik.h:159:11: warning: 'SkeletonIK::target_node_override' will be initialized after [-Wreorder] scene/animation/skeleton_ik.h:152:7: warning: 'bool SkeletonIK::use_magnet' [-Wreorder] scene/animation/skeleton_ik.cpp:418:1: warning: when initialized here [-Wreorder] scene/resources/tile_set.h:84:9: warning: 'TileSet::AutotileData::size' will be initialized after [-Wreorder] scene/resources/tile_set.h:83:7: warning: 'int TileSet::AutotileData::spacing' [-Wreorder] scene/resources/tile_set.h:92:12: warning: when initialized here [-Wreorder] scene/resources/tile_set.h:115:12: warning: 'TileSet::TileData::tile_mode' will be initialized after [-Wreorder] scene/resources/tile_set.h:114:9: warning: 'Color TileSet::TileData::modulate' [-Wreorder] scene/resources/tile_set.h:120:12: warning: when initialized here [-Wreorder] servers/physics/body_sw.h:84:19: warning: 'BodySW::direct_state_query_list' will be initialized after [-Wreorder] servers/physics/body_sw.h:57:11: warning: 'uint16_t BodySW::locked_axis' [-Wreorder] servers/physics/body_sw.cpp:756:1: warning: when initialized here [-Wreorder] ``` Nothing really relevant for us, but it's not a bad consistency improvement anyway so worth taking.
2018-09-27Fix warnings about unhandled enum value in switch [-Wswitch]Rémi Verschelde
Fixes GCC 5 warnings of the form: core/io/http_client.cpp:288:9: warning: enumeration value 'STATUS_SSL_HANDSHAKE_ERROR' not handled in switch [-Wswitch] core/io/marshalls.cpp:806:9: warning: enumeration value 'AABB' not handled in switch [-Wswitch] Those can be trivial cases where adding a default fallback is the solution, or more complex issues/hidden bugs where missed values are actually meant to be handled.
2018-09-19Added automatically set velocity when rigid is kinematicAndrea Catania
2018-09-12Misc. typosluz.paz
Found via `codespell -q 3 -I ../godot-word-whitelist.txt --skip="./thirdparty,*.po"`
2018-09-10Fiex bullet crashAndrea Catania
2018-09-07Fixed crash during raycast and CCD radius calculationAndrea Catania
2018-09-06Fixing trimesh precisionAndrea Catania
2018-09-06Optimized in case is used just 1 shape with no transformAndrea Catania
2018-08-07Merge pull request #20381 from AndreaCatania/phymat_2Juan Linietsky
Improved Physics material
2018-08-07Removed physics material combination mode. Added rough and absorbent ↵Andrea Catania
parameter to material. Fixed 'change' signal connection
2018-07-26Merge pull request #15643 from organicpencil/bullet_contact_impulseRémi Verschelde
Expose PhysicsDirectBodyState.get_contact_impulse
2018-07-26Reduce unnecessary COW on Vector by make writing explicitHein-Pieter van Braam
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-24Modified RigidBody, PhysicsDirectBodyState, PhysicsServer, and their ↵Tiger Caldwell
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-23Merge pull request #12403 from AndreaCatania/phymatJuan Linietsky
Physics material
2018-07-01added cylinder shape supportmuiroc
2018-05-11Implemented physics materialAndreaCatania
Hidden a function Fixed travis static check
2018-02-27Implemented Bullet method omit forcesAndrea Catania
2018-02-16Added Physics state APIsAndrea Catania
2018-02-13Fixes gravity calculation for kinematic bodies in BulletNeil Moore
2018-01-21attemp to fix #15743Mariano Suligoy
2018-01-18Fix typos in code and docs with codespellRémi Verschelde
Using v1.11.0 from https://github.com/lucasdemarchi/codespell
2018-01-12Expose PhysicsDirectBodyState.get_contact_impulseLee Pugh
2018-01-08Fixed Bullet collision shapes scaleAndreaCatania
2018-01-05Add missing copyright headers and fix formattingRémi Verschelde
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-04Merge pull request #13257 from AndreaCatania/masterRémi Verschelde
Fixed kinematic movement stuck, Changed how shape scale works.
2018-01-01Update copyright statements to 2018Rémi Verschelde
Happy new year to the wonderful Godot community!
2017-12-23Fixed kinematic movement stuck, Changed how shape scale works, OptimizedAndreaCatania
2017-12-23Fixed dispatch callbackAndreaCatania
2017-12-23Fixed rigidbody sleping, Fixes #13952AndreaCatania
2017-12-11Merge pull request #13836 from AndreaCatania/scaleRémi Verschelde
Fixed bullet scale on get_transform and joints
2017-12-10Implemented physics linear and angular lockAndreaCatania
2017-12-09Merge pull request #12756 from Stratos695/masterRémi Verschelde
Allowing double-axis lock in RigidBody & KinematicBody (Fixes #12500)
2017-12-08Fixed bullet get_transform scaleAndreaCatania
2017-12-07Style: Apply new clang-format 5.0 style to all filesRémi Verschelde
2017-11-21Set gravity on change body modeAndreaCatania
Fixes #13140
2017-11-10Allow double-axis lock in RigidBody and KinematicBodyEric Rybicki
2017-11-07Rewritten kinematic systemAndreaCatania
2017-11-04Bullet physics engine implementationAndreaCatania
This is a bullet wrapper that allows Godot to use Bullet physics and benefit about all features. Also it support all specific Godot physics functionality like multi shape body, areas, RayShape, etc.. It improve the Joints, Trimesh shape, and add support to soft body even if Godot is not yet ready to it.