Module ambient_api_core::prelude::physics
source · Available on crate feature
server
only.Expand description
[Server-only] Physics-related functionality, including applying forces, changing physical properties, and more.
Structs
- Collision results when using move_character.
- Where a raycast hit.
Enums
- Whether or not to apply a falloff to the strength of add_radial_impulse.
Functions
- Applies an
impulse
(a f32) outwards to all entitities withinradius
of theposition
, with an optionalfalloff_radius
. - Creates a revolute joint. entity0 or entity1 can either be
EntityId::null()
to bind this to the world frame. - Freezes an
entity
, so that it cannot move around. Does nothing if the entity was already frozen. - Move an entity with a character collider on it, by sweeping the collider. This will ensure that it collides with any objects in its path.
- Set character controller foot position
- Set character controller position
- Sets the gravity of the entire world to
gravity
. The defaultgravity
isvec3(0.0, 0.0, -9.82)
. - Starts a motor on
entity
withvelocity
. Does nothing if the motor has already been started. - Stops a motor on
entity
. Does nothing if the motor is not running. - Unfreezes a frozen
entity
, so that it can move around. Does nothing if the entity wasn’t frozen.