49 float explosion_force,
50 const math::vec3& explosion_position,
51 float explosion_radius,
52 float upwards_modifier,
70 auto ray_cast(
const math::vec3& origin,
71 const math::vec3& direction,
77 const math::vec3& direction,
83 const math::vec3& direction,
90 const math::vec3& direction,
137 std::shared_ptr<int> sentinel_ = std::make_shared<int>(0);
Component that handles physics properties and behaviors.
Manages the physics operations using the specified backend.
auto ray_cast(const math::vec3 &origin, const math::vec3 &direction, float max_distance, int layer_mask, bool query_sensors) const -> hpp::optional< raycast_hit >
static void on_destroy_component(entt::registry &r, entt::entity e)
Called when a physics component is destroyed.
static void apply_force(physics_component &comp, const math::vec3 &force, force_mode mode)
static void apply_torque(physics_component &comp, const math::vec3 &torque, force_mode mode)
Applies a torque to the specified physics component.
auto sphere_cast_all(const math::vec3 &origin, const math::vec3 &direction, float radius, float max_distance, int layer_mask, bool query_sensors) const -> physics_vector< raycast_hit >
static void clear_kinematic_velocities(physics_component &comp)
Clears kinematic velocities for the specified physics component.
auto deinit(rtti::context &ctx) -> bool
Deinitializes the physics system with the given context.
auto sphere_overlap(const math::vec3 &origin, float radius, int layer_mask, bool query_sensors) const -> physics_vector< entt::entity >
auto ray_cast_all(const math::vec3 &origin, const math::vec3 &direction, float max_distance, int layer_mask, bool query_sensors) const -> physics_vector< raycast_hit >
auto init(rtti::context &ctx) -> bool
Initializes the physics system with the given context.
static void on_create_component(entt::registry &r, entt::entity e)
Called when a physics component is created.
auto sphere_cast(const math::vec3 &origin, const math::vec3 &direction, float radius, float max_distance, int layer_mask, bool query_sensors) const -> hpp::optional< raycast_hit >
static void apply_explosion_force(physics_component &comp, float explosion_force, const math::vec3 &explosion_position, float explosion_radius, float upwards_modifier, force_mode mode)
std::chrono::duration< float > delta_t
hpp::small_vector< T, SmallSizeCapacity > physics_vector