Skip to content

Commit

Permalink
add changelog line + adapt docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Vrixyz committed Dec 9, 2024
1 parent b418dc1 commit ccce9fa
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

## Unreleased

### Added

- Added optional feature `picking-backend` to support bevy_picking.
- See `picking_backend` module documentation for more details.

## v0.28.0 (09 December 2024)

### Modified
Expand Down
3 changes: 1 addition & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//! Rapier is a set of two Rust crates `rapier2d` and `rapier3d` for efficient cross-platform
//! physics simulation. Its target application include video games, animation, robotics, etc.
//!
//! The `bevy_rapier` projects implements two other crates `bevy_rapier2d` and `bevy_rapier3d` which
//! The `bevy_rapier` project implements two crates `bevy_rapier2d` and `bevy_rapier3d` which
//! define physics plugins for the Bevy game engine.
//!
//! User documentation for `bevy_rapier` is on [the official Rapier site](https://rapier.rs/docs/).
Expand Down Expand Up @@ -58,7 +58,6 @@ pub mod pipeline;
pub mod plugin;

#[cfg(feature = "picking-backend")]
/// The bevy_picking rapier backend plugin and systems.
pub mod picking_backend;

/// Components related to character control.
Expand Down
9 changes: 5 additions & 4 deletions src/picking_backend/mod.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//! A picking backend for Rapier physics entities.
//!
//! By default, all colliders are pickable. Picking can be disabled for individual entities
//! by adding [`PickingBehavior::IGNORE`].
//! by adding [`PickingBehavior::IGNORE`](bevy::picking::PickingBehavior::IGNORE).
//!
//! To make rapier picking entirely opt-in, set [`RapierPickingSettings::require_markers`]
//! to `true` and add a [`RapierPickable`] component to the desired camera and target entities.
Expand All @@ -25,7 +25,7 @@ pub enum RapierCastVisibility {
/// Only cast rays against entities that are visible in the hierarchy. See [`Visibility`].
Visible,
}
/// Runtime settings for the [`MeshPickingPlugin`].
/// Runtime settings for the [`RapierPickingPlugin`].
#[derive(Resource, Reflect)]
#[reflect(Resource, Default)]
pub struct RapierPickingSettings {
Expand Down Expand Up @@ -53,7 +53,8 @@ impl Default for RapierPickingSettings {
}

/// An optional component that marks cameras and target entities that should be used in the [`RapierPickingPlugin`].
/// Only needed if [`RapierBackendSettings::require_markers`] is set to `true`, and ignored otherwise.
///
/// Only needed if [`RapierPickingSettings::require_markers`] is set to `true`, and ignored otherwise.
#[derive(Debug, Clone, Default, Component, Reflect)]
#[reflect(Component, Default)]
pub struct RapierPickable;
Expand All @@ -70,7 +71,7 @@ impl Plugin for RapierPickingPlugin {
}
}

/// Casts rays into the scene using [`RapierPickingSettings`] and sends [`PointerHits`] events.
///System which casts rays into the scene using [`RapierPickingSettings`] and sends [`PointerHits`] events.
#[allow(clippy::too_many_arguments)]
pub fn update_hits(
backend_settings: Res<RapierPickingSettings>,
Expand Down

0 comments on commit ccce9fa

Please sign in to comment.