#[repr(C)]pub struct b3BodyMoveEvent {
pub userData: *mut c_void,
pub transform: b3WorldTransform,
pub bodyId: b3BodyId,
pub fellAsleep: bool,
}Expand description
Body move events triggered when a body moves. Triggered when a body moves due to simulation. Not reported for bodies moved by the user. This also has a flag to indicate that the body went to sleep so the application can also sleep that actor/entity/object associated with the body. On the other hand if the flag does not indicate the body went to sleep then the application can treat the actor/entity/object associated with the body as awake. This is an efficient way for an application to update game object transforms rather than calling functions such as b3Body_GetTransform() because this data is delivered as a contiguous array and it is only populated with bodies that have moved. @note If sleeping is disabled all dynamic and kinematic bodies will trigger move events.
Fields§
§userData: *mut c_voidThe body user data.
transform: b3WorldTransformThe body transform.
bodyId: b3BodyIdThe body id.
fellAsleep: boolDid the body fall asleep this time step?
Trait Implementations§
Source§impl Clone for b3BodyMoveEvent
impl Clone for b3BodyMoveEvent
Source§fn clone(&self) -> b3BodyMoveEvent
fn clone(&self) -> b3BodyMoveEvent
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more