Crate bevy_2d_box_physics

Source

Structs§

CollisionBox
CollisionBoxes are defined as tuples, with the first reperesenting the width and second the height of the collision box.
CollisionBundle
A bundle for adding a collision
CollisionData
Contains information about the state of the collision(s)
CollisionLayers
A component that defines which collisions the attached object should collide with
Gravity
A resource defining the gravity direction and strength
PhysicsBundle
A bundle for physics-movement, without collision included
PhysicsConfiguration
A resource consisting of options for the physics-engine
PhysicsPlugin
Bevy plugin for handling Physics on the applicable RigidBodies
SensorBox
Sensors are a bit like collisions, but instead of limiting overlapping collision boxes, it just registers overlap to the SensorData and other systems can use this info
SensorBundle
A bundle for adding sensors
SensorData
A component that contains information about the state of a sensor
SensorLayers
Contains information about which sensors a sensor should activate with
Velocity
A component defining the velocity in the current frame

Enums§

RigidBody
A component describing what type of RigidBody we want to use (Static can’t move, Kinematic doesn’t have gravity, but is movable and Dynamic is movable and has gravity)

Functions§

calculate_movement
Calculate how much the entity should move in the next frame based on the velocity and collision data