avian_pickup 0.5.0

A plugin for implementing picking up dynamic rigid bodies in Avian physics for the Bevy engine. Modeled after Half Life 2's gravity gun.
Documentation
1
2
3
4
5
6
use crate::prelude::*;

/// Inspired by [`CWeaponPhysCannon::CanPickupObject`](https://github.com/ValveSoftware/source-sdk-2013/blob/master/mp/src/game/server/hl2/weapon_physcannon.cpp#L3421)
pub(super) fn can_pull(mass: ComputedMass, config: &AvianPickupActor) -> bool {
    mass.value() < config.pull.max_prop_mass
}