![]() |
ezEngine Release 25.08
|
Flags for what should happen when two physical bodies touch. More...
#include <Declarations.h>
Classes | |
struct | Bits |
Public Types | |
enum | Enum { None = 0 , SendContactMsg = EZ_BIT(0) , ImpactReactions = EZ_BIT(1) , SlideReactions = EZ_BIT(2) , RollXReactions = EZ_BIT(3) , RollYReactions = EZ_BIT(4) , RollZReactions = EZ_BIT(5) , AllRollReactions = RollXReactions | RollYReactions | RollZReactions , SlideAndRollReactions = AllRollReactions | SlideReactions , AllReactions = ImpactReactions | AllRollReactions | SlideReactions | SendContactMsg , Default = None } |
using | StorageType = ezUInt32 |
Flags for what should happen when two physical bodies touch.
The reactions need to be set up through ezSurface's. For most objects only some reactions make sense. For example a box may hit another object as well as slide, but it cannot roll. A barrel can impact and slide on some sides, but roll around its up axis (Z). A sphere can impact and roll around all its axis, but never slide. A soft object may not have any impact reactions.
Enumerator | |
---|---|
SendContactMsg | On contact, send a ezMsgPhysicContact msg directly to the component. |
ImpactReactions | Spawn prefabs for impacts (two objects hit each other with enough force). |
SlideReactions | Spawn prefabs for sliding (one object slides along the surface of another). |
RollXReactions | Spawn prefabs for rolling (one object rotates around its X axis while touching another). |
RollYReactions | Spawn prefabs for rolling (one object rotates around its Y axis while touching another). |
RollZReactions | Spawn prefabs for rolling (one object rotates around its Z axis while touching another). |