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-12-14BGE Physics clean up: double-promotion warningsJorge Bernal
2015-12-13BGE: Use float as default instead of double in Moto library.Porteries Tristan
Use float in moto instead of double for MT_Scalar. This switch allow future optimization like SSE. Additionally, it changes the OpenGL calls to float versions as they are very bad with doubles. Reviewers: campbellbarton, moguri, lordloki Reviewed By: lordloki Subscribers: brecht, lordloki Differential Revision: https://developer.blender.org/D1610
2015-11-05BGE: Cleanup occlusion buffer in CcdPhysicsEnvironment.cppPorteries Tristan
This patch cleanup spaces/braces and newlines. Reviewers: moguri, kupoman Reviewed By: moguri, kupoman Subscribers: kupoman Differential Revision: https://developer.blender.org/D1607
2015-10-17BGE: Use references in CcdPhysicsEnvironment::RemoveConstraint.Porteries Tristan
It avoids assert calls on rigid body destructor.
2015-10-11BGE: Adding a Max Jumps value to the character physic windowThomas Szepe
Actually we only have a Python API that allows to change the max jumps value. The patch also allows non programmers to change the maximum numbers of jumps. Reviewers: panzergame, sybren, campbellbarton, lordloki, moguri, agoose77 Reviewed By: lordloki, moguri Projects: #game_engine Differential Revision: https://developer.blender.org/D1302
2015-08-21BGE: Fix constraint free crash in RemoveConstraint.Porteries Tristan
Fix silly error getRigidBodyA() instead of getRigidBodyB()
2015-08-16BGE: Fix memory leak and crash with certain physic typesThomas Szepe
Fixing crash if the physic type is set sensor or character. Caused by a790e172d0281e64. Fixing memory leak, if the constraint is deleted with Python API removeConstraint(). Add RemoveConstraint() method to avoid code duplication. Rename old RemoveConstraint() to RemoveConstraintById() which is more suitable name for this method.
2015-08-11BGE: Fix T38448: Bullet constraint memory leak.Porteries Tristan
2015-08-10BGE: Fix T19377 restore dynamics after unparenting object.Porteries Tristan
Reviewers: scorpion81
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-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-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-14BGE: Add 'Lock Translation' for dynamic objectsThomas Szepe
The XYZ translation lock was missing for dynamic object. Reviewed By: panzergame
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-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-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-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
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-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-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.
2014-05-02BGE: Forgot a NULL check in CcdPhysicsEnvironment::MergeEnvironment()Mitchell Stokes
2014-05-01BGE cleanup: KX_GameObject::GetParent() no longer increases the object's ↵Mitchell Stokes
refcount. I'm not sure why this function ever increased the object's refcount. Any place in the code that calls KX_GameObject::GetParent() has to turn around and call parent->Release(). Forgetting to call Release() was a common cause of memory leaks (in fact, KX_SteeringActuator was probably leaking). If the refcount needs to be increased, the calling code can handle calling AddRef().
2014-04-30BGE: Fixing a memory leak from the recent physics changes.Mitchell Stokes
2014-04-24BGE Cleanup: Physics conversion is now handled by PHY_IPhysicsEnvironmentMitchell Stokes
The current physics conversion code was moved from KX_ConvertPhysicsObjects to CcdPhysicsEnvironment.
2014-04-24BGE Cleanup: Reducing KX_BlenderSceneConverter's dependence on Bullet.Mitchell Stokes
* Moving the BlenderDebugDraw (derived from btIDebugDraw) from KX_BlenderSceneConverter to CcdPhysicsEnvironment * Moving CcdPhysicsEnvironment initialization to CcdPhysicsEnvironment (this could probably be cleaned up some more with some sort of factory, or at least moving code to CcdPhysicsEnvironment's constructor) * Simplifying physics environment initialization (went from two switches to one)
2014-04-24BGE Cleanup: Reducing KX_Scene's dependence on Bullet.Mitchell Stokes
Instead, it now relies more on our physics abstractions (e.g., PHY_IPhysicsEnvironment).
2014-01-28Fix T37673: Ray casting could fail with 0 collision marginsSergej Reich
Use bullet's old method of doing ray casts to stay compatible with old files. It's faster but a bit less accurate.