Struct DynamicsWorld
A collection of motion information used during physics simulation.
Implements
Inherited Members
Namespace: Unity.Physics
Assembly: Unity.Physics.dll
Syntax
public struct DynamicsWorld : IDisposableConstructors
DynamicsWorld(int, int)
Construct a dynamics world with the given number of uninitialized motions.
Declaration
public DynamicsWorld(int numMotions, int numJoints)Parameters
| Type | Name | Description | 
|---|---|---|
| int | numMotions | Number of motions. | 
| int | numJoints | Number of joints. | 
Properties
Joints
Gets the joints.
Declaration
public NativeArray<Joint> Joints { get; }Property Value
| Type | Description | 
|---|---|
| NativeArray<Joint> | The joints. | 
MotionDatas
Gets the motion datas.
Declaration
public NativeArray<MotionData> MotionDatas { get; }Property Value
| Type | Description | 
|---|---|
| NativeArray<MotionData> | The motion datas. | 
MotionVelocities
Gets the motion velocities.
Declaration
public NativeArray<MotionVelocity> MotionVelocities { get; }Property Value
| Type | Description | 
|---|---|
| NativeArray<MotionVelocity> | The motion velocities. | 
NumJoints
Gets the number of joints.
Declaration
public int NumJoints { get; }Property Value
| Type | Description | 
|---|---|
| int | The total number of joints. | 
NumMotions
Gets the number of motions.
Declaration
public int NumMotions { get; }Property Value
| Type | Description | 
|---|---|
| int | 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()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 | 
|---|---|
| int | The joint index. | 
Reset(int, int)
Resets this object.
Declaration
public void Reset(int numMotions, int numJoints)Parameters
| Type | Name | Description | 
|---|---|---|
| int | numMotions | Number of motions. | 
| int | numJoints | Number of joints. | 
UpdateJointIndexMap()
Updates the joint index map.
Declaration
public void UpdateJointIndexMap()