Procházet zdrojové kódy

Documented sensor that detect static bodies

Jorrit Rouwe před 2 roky
rodič
revize
99bf29c110
1 změnil soubory, kde provedl 2 přidání a 0 odebrání
  1. 2 0
      Docs/Architecture.md

+ 2 - 0
Docs/Architecture.md

@@ -214,6 +214,8 @@ When you make a sensor Kinematic or Dynamic and activate it, it will also detect
 
 To create a sensor, either set [BodyCreationSettings::mIsSensor](@ref BodyCreationSettings::mIsSensor) to true when constructing a body or set it after construction through [Body::SetIsSensor](@ref Body::SetIsSensor). A sensor can only use the discrete motion quality type at this moment.
 
+To make sensors detect collisions with static objects, set the [BodyCreationSettings::mSensorDetectsStatic](@ref BodyCreationSettings::mSensorDetectsStatic) to true or call [Body::SetSensorDetectsStatic](@ref Body::SetSensorDetectsStatic). Note that it can place a large burden on the collision detection system if you have a large sensor intersect with e.g. a large mesh terrain or a height field as you will get many contact callbacks and these contacts will take up a lot of space in the contact cache. Ensure that your sensor is in an object layer that collides with as few static bodies as possible.
+
 ## Constraints
 
 Bodies can be connected to each other using constraints ([Constraint](@ref Constraint)).