Browse Source

Documented that constraints need to be removed before the body they attach to

Jorrit Rouwe 2 năm trước cách đây
mục cha
commit
958e411563
1 tập tin đã thay đổi với 2 bổ sung0 xóa
  1. 2 0
      Docs/Architecture.md

+ 2 - 0
Docs/Architecture.md

@@ -236,6 +236,8 @@ The following constraints are available:
 
 If you want to constrain a dynamic object to the unmovable 'world' you can use [Body::sFixedToWorld](@ref Body::sFixedToWorld) instead of creating a static body.
 
+Bodies do not keep track of the constraints that are connected to them. This means that you're responsible for removing any constraints attached to a body before removing the body from the PhysicsSystem.
+
 Adding and removing constraints can be done from multiple threads, but the constraints themselves do not have any protection against concurrent access. We assume that constraints are owned by some object (e.g. a Ragdoll) and that object ensures that it only modifies its own constraints and contains its own synchronization logic. Constraints can be freely modified except during the physics simulation step.
 
 Contact constraints (when bodies collide) are not handled through the [Constraint](@ref Constraint) class but through the [ContactConstraintManager](@ref ContactConstraintManager) which is considered an internal class.