[{"data":1,"prerenderedAt":256},["ShallowReactive",2],{"navigation":3,"/api/rigid-body/sensor":72,"/api/rigid-body/sensor-surround":251},[4,22],{"title":5,"path":6,"stem":7,"children":8},"Getting Started","/getting-started","1.getting-started/1.index",[9,10,14,18],{"title":5,"path":6,"stem":7},{"title":11,"path":12,"stem":13},"Installation Guide","/getting-started/installation","1.getting-started/2.installation",{"title":15,"path":16,"stem":17},"Usage","/getting-started/usage","1.getting-started/3.usage",{"title":19,"path":20,"stem":21},"How it works","/getting-started/how-it-works","1.getting-started/how-it-works",{"title":23,"path":24,"stem":25,"children":26},"Api","/api","2.api",[27,30,64,68],{"title":28,"path":24,"stem":29},"Physics","2.api/index",{"title":31,"path":32,"stem":33,"children":34},"Rigid body","/api/rigid-body","2.api/1.rigid-body/index",[35,36,40,44,48,52,56,60],{"title":31,"path":32,"stem":33},{"title":37,"path":38,"stem":39},"Automatic colliders","/api/rigid-body/automatic-colliders","2.api/1.rigid-body/1.automatic-colliders",{"title":41,"path":42,"stem":43},"Custom colliders","/api/rigid-body/custom-colliders","2.api/1.rigid-body/2.custom-colliders",{"title":45,"path":46,"stem":47},"Forces","/api/rigid-body/forces","2.api/1.rigid-body/3.forces",{"title":49,"path":50,"stem":51},"Collisions","/api/rigid-body/collisions","2.api/1.rigid-body/4.collisions",{"title":53,"path":54,"stem":55},"Sensor","/api/rigid-body/sensor","2.api/1.rigid-body/5.sensor",{"title":57,"path":58,"stem":59},"Contact force","/api/rigid-body/contact-force","2.api/1.rigid-body/6.contact-force",{"title":61,"path":62,"stem":63},"Instance rigid body","/api/rigid-body/instance-rigid-body","2.api/1.rigid-body/7.instance-rigid-body",{"title":65,"path":66,"stem":67},"Joints","/api/joint","2.api/2.joint",{"title":69,"path":70,"stem":71},"UseRapier","/api/use-rapier","2.api/3.use-rapier",{"id":73,"title":53,"body":74,"description":244,"extension":245,"links":246,"meta":247,"navigation":248,"path":54,"seo":249,"stem":55,"__hash__":250},"docs/2.api/1.rigid-body/5.sensor.md",{"type":75,"value":76,"toc":241},"minimark",[77,83,92,205,215,220,237],[78,79,80],"scene-wrapper",{},[81,82],"demos-sensor",{},[84,85,86,87,91],"p",{},"Sensor works pretty similar to ",[88,89,90],"a",{"href":50},"collisions"," but don't generate contacts: they only generate intersection events when one sensor collider and another collider start/stop touching.",[93,94,99],"pre",{"className":95,"code":96,"language":97,"meta":98,"style":98},"language-html shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","\u003CRigidBody activeCollision sensor @intersection-enter=\"onIntersectionEnter\"          @intersection-exit=\"onIntersectionExit\">\n  \u003CTresMesh>\n    \u003CTresTorusGeometry />\n    \u003CTresMeshNormalMaterial />\n  \u003C/TresMesh>\n\u003C/RigidBody>\n","html","",[100,101,102,152,163,175,185,195],"code",{"__ignoreMap":98},[103,104,107,111,115,119,122,125,128,131,135,137,140,142,144,147,149],"span",{"class":105,"line":106},"line",1,[103,108,110],{"class":109},"sMK4o","\u003C",[103,112,114],{"class":113},"swJcz","RigidBody",[103,116,118],{"class":117},"spNyl"," activeCollision",[103,120,121],{"class":117}," sensor",[103,123,124],{"class":117}," @intersection-enter",[103,126,127],{"class":109},"=",[103,129,130],{"class":109},"\"",[103,132,134],{"class":133},"sfazB","onIntersectionEnter",[103,136,130],{"class":109},[103,138,139],{"class":117},"          @intersection-exit",[103,141,127],{"class":109},[103,143,130],{"class":109},[103,145,146],{"class":133},"onIntersectionExit",[103,148,130],{"class":109},[103,150,151],{"class":109},">\n",[103,153,155,158,161],{"class":105,"line":154},2,[103,156,157],{"class":109},"  \u003C",[103,159,160],{"class":113},"TresMesh",[103,162,151],{"class":109},[103,164,166,169,172],{"class":105,"line":165},3,[103,167,168],{"class":109},"    \u003C",[103,170,171],{"class":113},"TresTorusGeometry",[103,173,174],{"class":109}," />\n",[103,176,178,180,183],{"class":105,"line":177},4,[103,179,168],{"class":109},[103,181,182],{"class":113},"TresMeshNormalMaterial",[103,184,174],{"class":109},[103,186,188,191,193],{"class":105,"line":187},5,[103,189,190],{"class":109},"  \u003C/",[103,192,160],{"class":113},[103,194,151],{"class":109},[103,196,198,201,203],{"class":105,"line":197},6,[103,199,200],{"class":109},"\u003C/",[103,202,114],{"class":113},[103,204,151],{"class":109},[206,207,208],"prose-note",{},[84,209,210,211,214],{},"Note you need to set the ",[100,212,213],{},"activeCollision"," prop to use sensors.",[216,217,219],"h2",{"id":218},"events","Events",[221,222,223,231],"field-group",{},[224,225,228],"field",{"name":226,"type":227},"intersection-enter","(payload: { source: SourceTarget, target: SourceTarget }) => void",[84,229,230],{},"Triggered when a sensor collider starts intersecting another collider.",[224,232,234],{"name":233,"type":227},"intersection-exit",[84,235,236],{},"Triggered when a sensor collider stops intersecting another collider.",[238,239,240],"style",{},"html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":98,"searchDepth":106,"depth":154,"links":242},[243],{"id":218,"depth":154,"text":219},"Use sensor colliders to detect when objects enter or exit a region without generating physical contact responses.","md",null,{},true,{"title":53,"description":244},"hKn9OiCZh5r4AcYLvrK9jeEqi5DZuD-N1OoJUjDfdlE",[252,254],{"title":49,"path":50,"stem":51,"description":253,"children":-1},"Detect and respond to collision events between rigid bodies using the activeCollision prop and collision-enter / collision-exit event listeners.",{"title":57,"path":58,"stem":59,"description":255,"children":-1},"Monitor and react to contact forces applied to rigid bodies during collisions.",1781680040530]