Skip to content

Commit

Permalink
docs(collider): move intersection refs to info-block
Browse files Browse the repository at this point in the history
  • Loading branch information
Neosoulink committed Nov 16, 2024
1 parent 44de932 commit 4403212
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions docs/components/collider.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Be aware that the event will be emitted by the `RigidBody` parent
<RigidBody @collision-enter="onCollisionEnter" @collision-exit="onCollisionExit">
<BallCollider activeCollision />
</RigidBody>
...
...

Check failure on line 14 in docs/components/collider.md

View workflow job for this annotation

GitHub Actions / Lint (20)

Insert `␍`
```

## Props
Expand Down Expand Up @@ -39,12 +39,14 @@ The `Collider` component comes with a set of useful events allowing actions base
The **Sensor** feature allows events to be triggered when there's an intersection or in other words, when the collider is traversed by another collider.

The traversed `Collider` (or the collider that will trigger events), is the sensor and should set the `activeCollision` and `sensor` properties to `true`.
By passing the above properties, the collider will no longer be affected by the physics law and will now start triggering the following intersection events:

- **@intersection-enter**: When another collider starts to traverse the *sensor*
- **@intersection-exit**: When another collider leave the *sensor*
By passing the above properties, the collider will no longer be affected by the physics law and will now start triggering the intersection events.

> ℹ️ Note that you can directly pass those properties to the **`RigidBody`** for **auto-colliders**.
> ::: info
> **@intersection-enter**: When another collider starts to traverse the *sensor*
> **@intersection-exit**: When another collider leave the *sensor*
>
> ℹ️ Note that you can directly pass the events to the **`RigidBody`** for **auto-colliders**.
> :::
```vue
<RigidBody
Expand Down

0 comments on commit 4403212

Please sign in to comment.