A component with a shape used to represent 3D physics objects in the physics simulation. You can use flags and layers to setup how the object interacts with other colliders. More...
Static Public Member Functions | |
static PhysicsCollider3D | Create (FrameBase f, Shape3D shape, PhysicsMaterial material=null, bool isTrigger=false, int layer=default) |
Creates a physics collider component with a Shape3D. More... | |
static void | Serialize (void *ptr, FrameSerializer serializer) |
Serializes a PhysicsCollider3D into a FrameSerializer. More... | |
Public Attributes | |
AssetRef< PhysicsMaterial > | _material |
Shape3D | Shape |
The Shape3D used by the collider. More... | |
Static Public Attributes | |
const int | SIZE = sizeof(Int32) * 2 + AssetRef<PhysicsMaterial>.SIZE + Shape3D.SIZE |
The size of the component (or struct/type) in-memory inside the Frame data-buffers or stack (when passed as value parameter). Not related to the snapshot payload this occupies, which is bit-packed and compressed. More... | |
Properties | |
Boolean? | Enabled [get, set] |
Boolean? | IsTrigger [get, set] |
Int32 | Layer [get, set] |
AssetRef< PhysicsMaterial >? | Material [get, set] |
A component with a shape used to represent 3D physics objects in the physics simulation. You can use flags and layers to setup how the object interacts with other colliders.
|
inlinestatic |
Creates a physics collider component with a Shape3D.
f | The frame. |
shape | The shape to be used by this collider. If the provided shape is a Shape3D.CompoundShape3D, this collider will create a deep, persistent copy of the provided compound, which will be disposed automatically when this component is removed from an entity. |
material | The physics material asset object. If null, it will use the default physics material. |
isTrigger | If the collider is trigger. False by default. |
layer | The index of the layer the collider belongs to. |
|
inlinestatic |
Serializes a PhysicsCollider3D into a FrameSerializer.
ptr | The pointer to the PhysicsCollider3D. |
serializer | The FrameSerializer instance into which the struct will be serialized. |
|
static |
The size of the component (or struct/type) in-memory inside the Frame data-buffers or stack (when passed as value parameter). Not related to the snapshot payload this occupies, which is bit-packed and compressed.