Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2015-07-25Fix compile warning in 04b369Porteries Tristan
2015-07-25BGE: Fix T35454: Soft body joints crash.Porteries Tristan
Constraint on soft bodies are special and return 0 as constraint id. So we have to check that the id is not 0 in function setParam, getParam, getAppliedImpulse and removeConstraint.
2015-07-25BGE: Fix T45278 sleeping deactivation with overlay scene.Porteries Tristan
this commit fix also angular and linear threshold sleeping value update via bge.constraints.
2015-07-04BGE: Fix T45259 collision sensor registration.Porteries Tristan
2015-07-02Fix T45269: Blender 2.75 crashes when I run my the gameSybren A. Stüvel
Velocity clamping on static objects caused a crash.
2015-06-28BGE: added clamping of angular velocity.Sybren A. Stüvel
Angular velocity clamping was missing from the BGE. It is implemented similarly to the linear velocity clamping. It is needed to be able to drive physical simulations of systems that have a limited rotational speed. Reviewed by: campbellbarton, panzergame, ton Differential Revision: https://developer.blender.org/D1365
2015-06-28BGE Fix: apply velocity clamping on every physics subtickSybren A. Stüvel
This patch uses the Bullet "internal tick callback" functionality to ensure that velocity clamping is performed after every physics update. This makes a difference when physics subticks > 1, as in that case the too-high velocity could have impacted the simulation. This patch follows the examples at [1] and [2]; the latter example also explains that the way we limit velocity in the BGE (before this patch) is wrong. [1] http://bulletphysics.org/mediawiki-1.5.8/index.php/Simulation_Tick_Callbacks [2] http://www.bulletphysics.org/mediawiki-1.5.8/index.php/Code_Snippets#I_want_to_cap_the_speed_of_my_spaceship; Reviewed by: panzergame Differential Revision: https://developer.blender.org/D1364
2015-06-20BGE Cleanup: remove dead code at SetCenterOfMassTransformJorge Bernal
Basically, at this line body is always NULL and the code is never executed Reviewers: moguri, hg1, panzergame, agoose77 Reviewed By: hg1, panzergame, agoose77 Subscribers: blueprintrandom Projects: #game_engine Differential Revision: https://developer.blender.org/D1331
2015-06-19BGE: Simplify collision callback registration.Porteries Tristan
Remove list m_triggerController and just use getter CcdPhysicsController->Registered(). Reviewers: sybren, agoose77
2015-06-16Cleanup: styleCampbell Barton
2015-05-30BGE Cleanup: Removing flen variable where it is not usedJorge Bernal
2015-05-28BGE Cleanup: Remove old commented Sumo physics codeJorge Bernal
2015-05-14BGE: Add 'Lock Translation' for dynamic objectsThomas Szepe
The XYZ translation lock was missing for dynamic object. Reviewed By: panzergame
2015-05-12BGE : Fix Bullet shape margin for triangle mesh static objectsPorteries Tristan
2015-05-10BGE : Fix crash during physics mesh update.Porteries Tristan
Currently we can't update the physics mesh of an added rigid body. The cause is that that we need to update all shapes to say that the mesh was changed, for static object we don't do that previously because we use a odd way to reallocate memory at the same place. So now when a mesh is changed we iterate all physics controllers which use the same shape info and recreate its shape with the correct mesh. example file : {F168100} Reviewers: scorpion81, sergof, hg1, sybren, moguri, agoose77 Reviewed By: moguri, agoose77 Subscribers: sybren Differential Revision: https://developer.blender.org/D1269
2015-05-09Fix T38335: incorrect triangle index in raycast with more than 2 quadsPorteries Tristan
eb81153896 broke the fix for T38335, and this fix was incomplete, now we iterate by triangles and polys in the same while block.
2015-05-09Cleanup: warning (sequence-point)Campbell Barton
2015-05-08Fix T38335: incorrect triangle index in raycast resultPorteries Tristan
Previously we forgot to do a special operation for indexes to convert a quad to two triangles.
2015-05-08BGE: Cleanup function UpdateMesh and SetMesh in CcdPhysicsController.cppPorteries Tristan
"if (value == true)" -> "if(value)" "if (ptr == NULL)" -> "if (!ptr)" "vector<bool>" -> "std::vector<bool>" And other blender typo.
2015-05-06BGE: Fix compound child shape added on instance game objectPorteries Tristan
2015-05-05BGE: Fix collision callbacks for compound controllersPorteries Tristan
It fix some mistakes in b5e96530353ef22d184a60cd2b59a5e451ee211f and made a more safety behavior for collision callbacks used in compound controllers during adding and removing.
2015-05-05BGE: Remove function DisableCcdPhysicsController and ↵Porteries Tristan
EnableCcdPhysicsController in CcdPhysicsEnvironment Replace EnableCcdPhysicsController by AddCcdPhysicsController and DisableCcdPhysicsController by RemoveCcdPhysicsController. Tested with compound shapes and collision sensors. Reviewers:agoose77, ideasman42
2015-04-24BGE : fix bugs with physics collision mask/groupPorteries Tristan
Currently there are bugs with physics objects in inactive layers, character and softbody. I added a function in CcdPhysicsEnvironement to know if a physics controller is currently active and for soft body I added the correct function in UpdateCcdPhysicsController to re-add a softbody in the dynamics world. The bug was introduced in D1243 commit 3d55859 Reviewers: hg1, scorpion81, lordloki, moguri, agoose77, sergof Reviewed By: sergof Subscribers: youle, moguri Differential Revision: https://developer.blender.org/D1253
2015-04-23Cleanup: warningsCampbell Barton
2015-04-19BGE: Support for collision group/mask from the api + activated on EndObject.Porteries Tristan
A Python API for the collision group / mask has been added: ``` KX_GameObject.collisionGroup KX_GameObject.collisionMask ``` The maximum number of collision groups and masked has been increased from eight to sixteen. This means that the max value of collisionGroup/Mask is (2 ** 16) - 1 EndObject will now activate objects that were sleeping and colliding with the removed object. This means that, unlike now, if a rigid body starts sleeping on top of another object, when the latter is removed the rigid body will activate and fall, rather than float midair as before. Collision groups that do not intersect used to collide on the first frame. Now this has been fixed so that they collide appropriately. Thanks to agoose77 for his help. Reviewers: scorpion81, hg1, agoose77, sergof Reviewed By: agoose77, sergof Subscribers: sergof, moguri Projects: #game_physics, #game_engine Differential Revision: https://developer.blender.org/D1243
2015-03-27BGE: New isDynamicSuspended python attributePorteries Tristan
This is a new KX_GameObject attribute that it increments the possibilities of optimization during the game Additionally the unused m_bSuspendDynamics variable is removed. Reviewers: moguri, agoose77, lordloki Reviewed By: agoose77, lordloki Subscribers: agoose77, lordloki Differential Revision: https://developer.blender.org/D1091
2015-03-22BGE: Add physics constraints replicationThomas Szepe
This patch will add a physics constraints replication for group instances (dupli group). It also fix crashing when when a group instance is made from a linked group instance and both are on the active layer. Initial patch T31443 from moerdn (Martin Sell). Reviewers: lordloki, sergof, moguri, sybren Reviewed By: moguri, sybren Differential Revision: https://developer.blender.org/D658
2015-03-21Fix T44065: fixed vehicle constraintSybren A. Stüvel
Commit ffee7f1a58a18bc08add94176ddffe29809139a6 broke vehicle constraints; this fixes that.
2015-03-16Fix T43178: BGE has hard-coded 60 Hz as frame rateSybren A. Stüvel
Two areas of the BGE use a hard-coded 60 Hz as frame rate. However, this 60 Hz is just a default setting, and can be changed in the Blender interface. This setting is now used instead of the hard-coded 60 Hz. CcdPhysicsEnvironment::SetFixedTimeStep() is actually never called, as we don't even support a true fixed-timestep simulation.
2015-03-04BGE: Fix crash when a constraint misses its reference objectSybren A. Stüvel
Blender allows you to create a constraint without specifying its reference object, even when the constraint requires such a reference. The BGE would crash on this. This change simply ignores such a constraint.
2015-02-21BGE: Fix T43215: Rigidbody constraints deletion.Thomas Szepe
Deleting an object was deleting all rigidbody constraints in the scene. Bug was introduced with D701. Reviewers: agoose77, sergof, moguri, lordloki, sybren Reviewed By: lordloki, sybren Subscribers: sybren, hbar, blueprintrandom, sergof, agoose77 Differential Revision: https://developer.blender.org/D1007
2015-02-18BGE: Fix T42437: Physics/Compound bugJorge Bernal
Null check to verify that parent has a character controller. Otherwise (i.e empty) it will crash. Reviewers: moguri, campbellbarton Reviewed By: campbellbarton Differential Revision: https://developer.blender.org/D1115
2015-02-13BGE Fix T39026: No collisions detected with parented rigid body objectJorge Bernal
Fix for T39026. Preliminary investigation by blenderscripter on D446. Also it solves bug T41285 (Parenting object leave collission box). Refactor commit b90de0331df6c92af909b20a3e183596ff3511e4 introduced a regression bug. Reviewers: sergof, campbellbarton, moguri Reviewed By: moguri Subscribers: blueprintrandom, blenderscripter Differential Revision: https://developer.blender.org/D1064
2015-02-09BGE - Vehicle Controller - add background and API checks for arguments of ↵Ines Almeida
function calls Fixes T41570 crash For readability, attachDir was renamed to downDir and the Python API docs renamed accordingly
2015-02-08BGE physics: When colliding, report first contact point to PythonSybren A. Stüvel
This patch adds two parameters to the functions in the collisionCallbacks list. The callback function should thus be like this: ``` def on_colliding(other, point, normal): print("Colliding with %s at %s with normal %s" % (other, point, normal)) game_ob.collisionCallbacks.append(on_colliding) ``` The `point` parameter will contain the collision point in world coordinates on the current object, and the `normal` contains the surface normal at the collision point. The callback functions are checked for the number of arguments `co_argcount`. The new `point` and `normal` arguments are only passed when `co_argcount > 1` or when `co_argcount` cannot be determined. Reviewers: brita_, campbellbarton Subscribers: sergey, sybren, agoose77 Projects: #game_physics Differential Revision: https://developer.blender.org/D926
2015-01-29BGE: draw contact points + normals in yellowSybren A. Stüvel
Red was used with different semantics in the physics visualisation, switching to yellow to prevent confusion. A screenshot can be found at http://www.pasteall.org/pic/80766 -- it's the yellow balls + lines. Reviewers: brita_, lordloki, campbellbarton Reviewed By: lordloki, campbellbarton Subscribers: lordloki Projects: #game_physics Differential Revision: https://developer.blender.org/D925
2015-01-29BGE: draw contact points as sphere + line indicating the surface normal.Sybren A. Stüvel
A screenshot can be found at http://www.pasteall.org/pic/80766 -- it's the yellow balls + lines. Reviewers: brita_, lordloki, campbellbarton Reviewed By: lordloki, campbellbarton Subscribers: lordloki Projects: #game_physics Differential Revision: https://developer.blender.org/D925
2015-01-21Cleanup of BGE code CcdPhysicsEnvironment::CallbackTriggers()Sybren A. Stüvel
Refactored some code to be easier to read. Semantically the code is identical. - Some conditions were negated to be able to return/continue early, rather than having the majority of the code inside an if-body. - Conditions were simplified (!(a == b)) turned into (a != b); repeated conditions calculated only once. - Unnecessary variables and one unnecessary condition were eliminated. Reviewers: campbellbarton, lordloki Reviewed By: lordloki Projects: #game_physics Differential Revision: https://developer.blender.org/D954
2015-01-15BGE physics: get/set linear and angular dampingSybren A. Stüvel
This patch adds the following R/W properties and method to `KX_GameObject`: - `linearDamping` -- get/set linear damping - `angluarDamping` -- get/set angular damping - `setDamping(linear, angular)` -- set both simultaneously These allow runtime changes to the same properties that are accessible at design time in Blender's UI via `game.damping` and `game.rotation_damping`. The names of the properties were chosen to mirror the internal names of the BGE physics engine, as these are (AFAIK) also the commonly used names in physics literature. Reviewers: campbellbarton Projects: #game_physics Differential Revision: https://developer.blender.org/D936
2014-12-03BGE: Fix Rigid body constraint deletionHG1
Fix for T41294. Rigid body constraints are not deleted, if the corresponding game objects are deleted. Reviewers: moguri Differential Revision: https://developer.blender.org/D701
2014-11-21Cleanup: typoCampbell Barton
2014-10-08Ghost Context RefactorJason Wilkins
https://developer.blender.org/D643 Separates graphics context creation from window code in Ghost so that they can vary separately.
2014-08-07Cleanup: Remove special code for Visual Studio 2008.Thomas Dinges
Goodbye VC2008, it has been a pleasure (more or less) :D SCons / CMake cleaenup will follow. Differential Revision: https://developer.blender.org/D715
2014-07-18BGE: Add missing documentation and attribute constraint_type for ↵HG1
ConstraintWrapper 1. Add attribute to get the constraint type. 2. Add missing documentation for getParent, setParam, constraint_id in bge.types.KX_ConstraintWrapper.rst. 3. Add missing documentation for GENERIC_6DOF_CONSTRAINT and flag bit in bge.constraints.rst. 4. Fix typo in CcdPhysicsEnvironment.cpp Reviewers: moguri Reviewed By: moguri Differential Revision: https://developer.blender.org/D654
2014-07-16Fix T40146: BGE Compound parent crashMitchell Stokes
2014-07-12BGE debug API and actuatorHG1
This patch adds some new debug methods to the KX_GameObject for manually adding the debug list and bge.render for controlling the debug visualization. It also adds a new debug actuator, which allows to control the same functions. This patch is a updated version of T33701. Thread on Blenderartists: http://blenderartists.org/forum/showthread.php?264745-Debug-proerties-for-added-objects-patch&p=2256018&viewfull=1#post2256018 Reviewers: moguri Reviewed By: moguri Differential Revision: https://developer.blender.org/D635
2014-07-10Fix T40909: BGE softbodies broken.Mitchell Stokes
Looks like softbody settings got lost in a recent cleanup.
2014-07-07BGE: Fix for applyImpulse functionJorge Bernal
This is related to task T29419. Credit also goes to Goran Milovanovic (goran) for proposing an initial fix for this issue. The issue is the current behavior of applyImpulse doesn't match the behavior described in the documentation as instead of a impulse point in world coordinates, it seems to require a coordinate in a local space. Additionally, applyImpulse function isn't consistent with similar functions (applyForce, applyTorque, etc) as it doesn't allow to choose in which space (local or global) the impulse is applied. Now, we have the following function: applyImpulse(point, impulse, local=False) being "point" the point to apply the impulse to (in world or local coordinates). When local is False will have both point and impulse in World space and when local is True will have point and impulse in local space. Reviewers: moguri, dfelinto, brita_ Reviewed By: moguri Differential Revision: https://developer.blender.org/D567
2014-05-16Fix T38895: Unstable behavior using VehicleWrapper after Bullet 2.82 updateMitchell Stokes
The Bullet 2.82 update uses a different method for ray casting that seems incompatible with our older files. So, for now we just force the vehicle physics to use the older ray casting method.
2014-05-16BGE Physics: Better follow the old (pre-cleanup) logic for determining ↵Mitchell Stokes
bounds types. This prevents older files from breaking.