Struct DynamicsWorld
A collection of motion information used during physics simulation.
Inherited Members
Namespace: Unity.Physics
Syntax
[NoAlias]
public struct DynamicsWorld : IDisposable
Constructors
DynamicsWorld(Int32, Int32)
Construct a dynamics world with the given number of uninitialized motions.
Declaration
public DynamicsWorld(int numMotions, int numJoints)
Parameters
Type | Name | Description |
---|---|---|
Int32 | numMotions | Number of motions. |
Int32 | numJoints | Number of joints. |
Properties
Joints
Gets the joints.
Declaration
public readonly NativeArray<Joint> Joints { get; }
Property Value
Type | Description |
---|---|
NativeArray<Joint> | The joints. |
MotionDatas
Gets the motion datas.
Declaration
public readonly NativeArray<MotionData> MotionDatas { get; }
Property Value
Type | Description |
---|---|
NativeArray<MotionData> | The motion datas. |
MotionVelocities
Gets the motion velocities.
Declaration
public readonly NativeArray<MotionVelocity> MotionVelocities { get; }
Property Value
Type | Description |
---|---|
NativeArray<MotionVelocity> | The motion velocities. |
NumJoints
Gets the number of joints.
Declaration
public readonly int NumJoints { get; }
Property Value
Type | Description |
---|---|
Int32 | The total number of joints. |
NumMotions
Gets the number of motions.
Declaration
public readonly int NumMotions { get; }
Property Value
Type | Description |
---|---|
Int32 | The total number of motions. |
Methods
Clone()
Clone the world.
Declaration
public DynamicsWorld Clone()
Returns
Type | Description |
---|---|
DynamicsWorld | A copy of this object. |
Dispose()
Free internal memory.
Declaration
public void Dispose()
Implements
GetJointIndex(Entity)
Gets the zero-based index of the joint.
Declaration
public int GetJointIndex(Entity entity)
Parameters
Type | Name | Description |
---|---|---|
Entity | entity | The entity. |
Returns
Type | Description |
---|---|
Int32 | The joint index. |
Reset(Int32, Int32)
Resets this object.
Declaration
public void Reset(int numMotions, int numJoints)
Parameters
Type | Name | Description |
---|---|---|
Int32 | numMotions | Number of motions. |
Int32 | numJoints | Number of joints. |
UpdateJointIndexMap()
Updates the joint index map.
Declaration
public void UpdateJointIndexMap()