HughPH.Box2D
Organised dotnet bindings for Box2D 3.1.0
Loading...
Searching...
No Matches
Public Attributes | Properties | List of all members
Box2D.BodyMoveEvent Struct Reference

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 Body.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. More...

Collaboration diagram for Box2D.BodyMoveEvent:
Collaboration graph
[legend]

Public Attributes

readonly Transform Transform
 The transform of the body.
 
readonly Body Body
 The body that moved.
 

Properties

object? UserData [get]
 The user data associated with the body.
 
bool FellAsleep [get]
 The body went to sleep.
 

Detailed 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 Body.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.


The documentation for this struct was generated from the following file: