From 8ec684afabdd33efd8384d319639c5d05def7f08 Mon Sep 17 00:00:00 2001 From: Thierry Berger Date: Mon, 9 Dec 2024 12:06:13 +0100 Subject: [PATCH] add changelog line + adapt docs --- CHANGELOG.md | 5 +++++ src/lib.rs | 3 +-- src/picking_backend/mod.rs | 9 +++++---- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b8640af8..34b52aba 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/src/lib.rs b/src/lib.rs index 62c0e49b..6c1d5635 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -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/). @@ -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. diff --git a/src/picking_backend/mod.rs b/src/picking_backend/mod.rs index f35e14da..69837f92 100644 --- a/src/picking_backend/mod.rs +++ b/src/picking_backend/mod.rs @@ -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. @@ -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 { @@ -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; @@ -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,