Version: Unity 6.3 Beta (6000.3)
LanguageEnglish
  • C#

PhysicsWorld

struct in UnityEngine.LowLevelPhysics2D

/

Implemented in:UnityEngine.Physics2DModule

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Description

A world is a container for all other physics objects such as PhysicsBody, PhysicsShape, PhysicsJoint etc. A world can be simulated in isolation from all other worlds. The maximum number of worlds that can be created at one time is defined by PhysicsConstants.MaxWorlds. A world is completely isolated from all other worlds.

Static Properties

Property Description
aabbMargin The distance used to expand AABBs in the broadphase dynamic tree, in meters. This allows broadphase proxies to move by a small amount without triggering a tree adjustment. This value is 0.05f * PhysicsWorld.lengthUnitsPerMeter. Normally this is 5cm.
bodyMaxRotation The maximum rotation of a body per time step, in degrees. This limit is very large and is used to prevent numerical problems. This value is approximately 45-degrees or 0.25f * PhysicsMath.PI radians.
bodyTimeToSleep The time that a body must be still before it will go to sleep, in seconds. This value is 0.5f
bypassLowLevel Get if the low-level physics is currently bypassed or not. When bypassed, no simulations or rendering will occur reducing it to near-zero CPU overhead. This can be controlled via PhysicsLowLevelSettings2D.bypassLowLevel.
concurrentSimulations Controls how many simulations can be started in parallel. Whilst running simulations in parallel can improver overall performance, workers should ideally be left free for the simulation solver otherwise it may degrade solving performance. The actual quantity of workers used will always be capped to those available on the current device. If the total number of workers available is below 4 then parallel simulation won't occur as generally this would reduce overall performance, however parallel solving of each simulation using workers will still be used. This should not be confused with the quantity of workers used when solving a simulation.
defaultWorld Get the default world created at start-up. This world cannot be destroyed as it is permanently owned by Unity itself. See PhysicsWorld.SetOwner and PhysicsWorld.isOwned.
globalCounters Get the world counters, summed for all the active worlds.
globalProfile Get the world timing profile, summed for all the active worlds.
hugeWorldExtent Positions greater than about 16km will have precision problems, so 100km as a limit should be fine in all cases. This is used to detect bad values. This value is 100000.0f * PhysicsWorld.lengthUnitsPerMeter.
isRenderingAllowed Get if rendering is currently allowed. Rendering is always allowed in the Editor however it is only allowed in build if PhysicsLowLevelSettings2D.drawInBuild is active when building.
lengthUnitsPerMeter Get the internal length units per meter. Changes won't take effect until exiting play mode. The physics system bases all length units on meters but you may need different units for your project. You can set this value to use different units but it should only be modified before any other calls to the physics system occur and only modified once. Changing this value after any physics object has been created can result in severe simulation instabilities. For example, if your game uses pixels for units you can use pixels for all length values sent to the physics system. There should be no extra cost however, the physics system has some internal tolerances and thresholds that have been tuned for meters. By calling this function, the physics system is better able to adjust those tolerances and thresholds to improve accuracy. A good rule of thumb is to pass the height of your player character to this function. So if your player character is 32 pixels high, then pass 32 to this function. Then you may confidently use pixels for all the length values sent to the physics system. All length values returned from the physics system will also then be in pixels because the physics system does not do any scaling internally, however, you are now on the hook for coming up with good values for gravity, density, and forces. The default value is 1.
linearSlop A small length used as a collision and constraint tolerance, in meters. Usually it is chosen to be numerically significant, but visually insignificant. This value is 0.005f * PhysicsWorld.lengthUnitsPerMeter. Normally this is 0.5cm.
safetyLocksEnabled Get/Set whether safety threading locks are enabled or not. Locks are enabled by default however on platforms that do not support threading, locks are not used. Disabling locks can result in a small performance boost however, please note the following EXTREME CAUTIONS. Typically, per-world, multiple read operations can happen in parallel however only a single write operation can occur concurrently. Read and write operations can never happen at the same time. Locking is a self-balancing reader-preferred system that tries to reduce writers "starving". Once a writer is in a queue, it registers incoming readers as waiting readers and, once active readers are handled, it starts processing a single writer. After that writer has been handled, it flips waiting readers into active readers and processes them. Whilst this system is extremely fast, it does have a very small overhead. Disabling this system can give a small performance boost but is nearly always not worth it therefore this option should be used for testing only. EXTREME CAUTION should be taken if disabling locks on platforms that support threading! A majority of this API is thread-safe and is is due to the safety locks! Locks are used to ensure that read and write operations do not interfere with each other. Locks also ensure that no read or write operations happen during a simulation step. Overlapping read or write operations will almost certainly result in corruptions and a subsequent crash, so unless you are absolutely sure this is not the case, do not disable locks!
speculativeContactDistance The distance at which speculative contacts will be calculated. This reduces jitter. This value is 4.0f * PhysicsWorld.lengthUnitsPerMeter. Normally this is 2cm.
useFullLayers Indicates if the option of PhysicsLowLevelSettings2D.useFullLayers is active or not. If no PhysicsLowLevelSettings2D asset is assigned, this option will return false (inactive). When active, the 64-bit layers are used (see PhysicsLowLevelSettings2D.physicsLayerNames) for property drawers and PhysicsLayers.GetLayerMask. When inactive, the 32-bit layers are used (see UnityEngine.LayerMask) for property drawers and PhysicsLayers.GetLayerMask. In all cases, the physics system itself will always use the full 64-bit layers assigned, however when using 32-bit layers, the top 32-bits will be set to zero.
worldCount Get the number of created worlds. This will be a value in the range of 1 to PhysicsConstants.MaxWorlds.

Properties

Property Description
autoBodyUpdateCallbacks Controls if body update callback targets are automatically called. See PhysicsWorld.SendBodyUpdateCallbacks
autoContactCallbacks Controls if shape contact callback targets are automatically called. See PhysicsWorld.SendContactCallbacks
autoJointThresholdCallbacks Controls if joint threshold callback targets are automatically called. See PhysicsWorld.SendJointThresholdCallbacks
autoTriggerCallbacks Controls if shape trigger callback targets are automatically called. See PhysicsWorld.SendTriggerCallbacks
awakeBodyCount Get the number of awake bodies in the world.
bodyUpdateEvents Get the body events from the last simulation. The PhysicsBody objects returned should be checked to see if they are valid before accessing as they may have been deleted since this event was produced (see PhysicsBody.isValid). Any change to the world state can invalidate this data so referring to this data afterwards may cause an unavoidable crash! It is recommended that you immediately extract what information you need and not directly reference the returned data. See BodyUpdateEvent.
bounceThreshold Adjust the bounce threshold, usually in meters per second. It is recommended not to make this value very small because it will prevent bodies from sleeping.
contactBeginEvents Get the contact begin events from the last simulation. The PhysicsShape objects returned should be checked to see if they are valid before accessing as they may have been deleted since this event was produced (see PhysicsShape.isValid). The Contact objects returned should be checked to see if they are valid before accessing as they may have been deleted since this event was produced (see LowLevelPhysics2D.PhysicsShape.Contact.isValid). Any change to the world state can invalidate this data so referring to this data afterwards may cause an unavoidable crash! It is recommended that you immediately extract what information you need and not directly reference the returned data. See ContactBeginEvent.
contactDamping The contact bounciness with 1 being critical damping (non-dimensional).
contactEndEvents Get the contact end events from the last simulation. The PhysicsShape objects returned should be checked to see if they are valid before accessing as they may have been deleted since this event was produced (see PhysicsShape.isValid). The Contact objects returned should be checked to see if they are valid before accessing as they may have been deleted since this event was produced (see LowLevelPhysics2D.PhysicsShape.Contact.isValid). Any change to the world state can invalidate this data so referring to this data afterwards may cause an unavoidable crash! It is recommended that you immediately extract what information you need and not directly reference the returned data. See ContactEndEvent.
contactFilterCallbacks Controls if contact filter callbacks will be called. A contact filter callback allows direct control over whether a contact will be created between a pair of shapes. This applies to both triggers and non-triggers but only with Dynamic bodies. These are relatively expensive so disabling them can provide a significant performance benefit. A contact filter callback will call the PhysicsShape.callbackTarget for both shapes involved if they implement IContactFilterCallback.
contactFrequency The contact stiffness, in cycles per second.
contactHitEvents Get the contact hit events from the last simulation. The PhysicsShape objects returned should be checked to see if they are valid before accessing as they may have been deleted since this event was produced (see PhysicsShape.isValid). Any change to the world state can invalidate this data so referring to this data afterwards may cause an unavoidable crash! It is recommended that you immediately extract what information you need and not directly reference the returned data. See ContactHitEvent.
contactHitEventThreshold The contact hit event threshold controls the collision speed needed to generate a contact hit event, usually in meters per second. See ContactHitEvent.
contactSpeed The contact speed used to solve overlaps, in meters per second.
continuousAllowed Controls if continuous collision detection will be used between Dynamic and Static bodies. Generally you should keep continuous collision enabled to prevent fast moving objects from going through Static objects. The performance gain from disabling continuous collision is minor.
counters Get the world counters.
definition Get/Set a world definition by accessing all of its properties. This is provided as convenience only and should not be used when performance is important as all the properties defined in the definition are accessed sequentially. You should try to only use the specific properties you need rather than using this feature.
drawCapacity Controls the draw capacity. The draw capacity of the buffers when drawing are initially zero however increasing this value will mean buffers won't be resized when more elements are drawn and therefore no GC allocations will occur. Changes won't take effect until exiting play mode. This value directly controls the capacity for each element type drawn. This is only used in the Unity Editor or in a Development Player.
drawColors Controls what colors are used to draw PhysicsBody, PhysicsShape, PhysicsJoint etc. This is only used in the Unity Editor or in a Development Player.
drawFillAlpha Controls the draw fill alpha. This is used to scale the interior fill alpha and is only used when PhysicsWorld.DrawFillOptions.Outline is used so that the interior color can be distinguished from the outline color by transparency. This is only used in the Unity Editor or in a Development Player.
drawFillOptions Controls what aspects of is drawn using LowLevelPhysics2D.PhysicsWorld.Draw. This is only used in the Unity Editor or in a Development Player.
drawImpulseScale Controls the joint contact impulse scale used when drawing contact impulses. This is only used in the Unity Editor or in a Development Player.
drawNormalScale Controls the joint contact normal scale used when drawing contact normals. This is only used in the Unity Editor or in a Development Player.
drawOptions Draw Options used to control what is drawn using LowLevelPhysics2D.PhysicsWorld.Draw. This is only used in the Unity Editor or in a Development Player. See DrawOptions.
drawPointScale Controls the draw point scale used when drawing points. This is only used in the Unity Editor or in a Development Player.
drawThickness Controls the draw thickness (outline and orientation). This is only used in the Unity Editor or in a Development Player.
elementDepth Controls the element depth. When using custom drawing of geometry or primitive shapes there is no reference to the orthoganal axis used with respect to the current PhysicsWorld.transformPlane. The element depth is in world-space and for each transform plan is defined as: Element depth is rendered along the Z axis when using PhysicsWorld.TransformPlane.XY.Element depth is rendered along the Y axis when using PhysicsWorld.TransformPlane.XZ.Element depth is rendered along the X axis when using PhysicsWorld.TransformPlane.ZY. You should set the element depth before performing any custom draw. The element depth will be reset to zero when rendering is complete. This is only used in the Unity Editor or in a Development Player.
gravity Get/Set the gravity vector applied to all bodies in the world, usually in m/s^2.
isDefaultWorld Check if this is the default PhysicsWorld. The default world is automatically created at start-up.
isEmpty Check if the world is empty as defined by having no bodies, shapes or joints.
isOwned Get if the world is owned. See PhysicsWorld.SetOwner.
isValid Check if the world is valid.
jointThresholdEvents Get the joint events from the last simulation. An event is produced by a Joint which exceeds either its PhysicsJoint.forceThreshold or PhysicsJoint.torqueThreshold. The PhysicsJoint objects returned should be checked to see if they are valid before accessing as they may have been deleted since this event was produced (see PhysicsJoint.isValid). Any change to the world state can invalidate this data so referring to this data afterwards may cause an unavoidable crash! It is recommended that you immediately extract what information you need and not directly reference the returned data. See JointThresholdEvent.
lastSimulationDeltaTime Get the delta-time used for the last simulation run.
lastSimulationTimestamp Get the timestamp when the last simulation was run.
maximumLinearSpeed Get/Set the maximum linear speed.
paused Get/Set if the world is paused. When paused, any simulation attempted will be ignored whether it be automatic or manual.
preSolveCallbacks Controls if pre-solve callbacks will be called. This only applies to Dynamic bodies and is ignored for triggers. These are relatively expensive so disabling them can provide a significant performance benefit. A pre-solve callback will call the PhysicsShape.callbackTarget for both shapes involved if they implement IPreSolveCallback.
profile Get the world timing profile.
simulationMode Get/Set the simulation mode which controls when or if the simulation will be automatically simulated. See UnityEngine.SimulationMode2D and PhysicsWorld.Simulate.
simulationSubSteps Get/Set the simulation sub-steps to use during simulation. See PhysicsWorld.Simulate.
simulationWorkers Get/Set the simulation worker count for the world. The actual quantity of workers used will always be capped to those available on the current device and reading the property will return the number of workers actually being used by the device. Changing the worker count continuously is not recommend and will impact performance as it requires the task queue be recreated. See PhysicsWorldDefinition.simulationWorkers.
sleepingAllowed Controls if bodies go to sleep when not moving and not interacting. Sleeping can provide a significant performance improvement when many Dynamic or Kinematic bodies are in the world.
transformPlane Controls the transform plane that the world uses when writing transforms. See PhysicsWorld.transformWriteMode.
transformTweening Controls if Transform tweening is used. Transform tweening is where bodies that have their PhysicsBody.transformObject set, write to the UnityEngine.Transform each frame depending on the specific body TransformWriteMode set. Regardless of this setting, Transform tweening is never used if the PhysicsWorld.simulationMode is UnityEngine.SimulationMode2D.Update or PhysicsWorld.transformWriteMode is PhysicsWorld.TransformWriteMode.Off.
transformWriteMode Controls how transform writing is handled. Only bodies that have their PhysicsBody.transformWriteMode active and produce a BodyUpdateEvent will write to a transform. See TransformWriteMode.
triggerBeginEvents Get the trigger begin events from the last simulation. The PhysicsShape objects returned should be checked to see if they are valid before accessing as they may have been deleted since this event was produced (see PhysicsShape.isValid). Any change to the world state can invalidate this data so referring to this data afterwards may cause an unavoidable crash! It is recommended that you immediately extract what information you need and not directly reference the returned data. See TriggerBeginEvent.
triggerEndEvents Get the trigger end events from the last simulation. The PhysicsShape objects returned should be checked to see if they are valid before accessing as they may have been deleted since this event was produced (see PhysicsShape.isValid). Any change to the world state can invalidate this data so referring to this data afterwards may cause an unavoidable crash! It is recommended that you immediately extract what information you need and not directly reference the returned data. See TriggerEndEvent.
userData Get/Set PhysicsUserData that can be used for any purpose. This cannot be set on the PhysicsWorld.defaultWorld and will always be at the default. The physics system doesn't use this data, it is entirely for custom use.
warmStartingAllowed Is warm-starting allowed in the world? Disabling warming-starting will severely impact stability. This is typically used for testing only!

Public Methods

Method Description
CastGeometry Returns the shape(s) that intersect the specified Circle geometry as it is cast through the world. See QueryFilter, WorldCastMode, WorldCastResult and Allocator
CastMover Cast a "Mover" which is geometry designed to collide with the world and solve its movement. Everything is specified via the WorldMoverInput with results returned in WorldMoverResult.
CastRay Returns the shape(s) that intersect the specified Ray. Technically this is a line-segment and not an infinite ray. See QueryFilter, WorldCastMode, WorldCastResult and Allocator.
CastShape Returns the shape(s) that intersect the specified shape as it is cast through the world. Neither PhysicsShape.ShapeType.Segment or PhysicsShape.ShapeType.ChainSegment shape types are supported. See QueryFilter, WorldCastMode, WorldCastResult and Allocator.
CastShapeProxy Returns the shape(s) that intersect the specified Circle geometry as it is cast through the world. See QueryFilter, WorldCastMode, WorldCastResult and Allocator.
ClearDraw Clear all the custom drawn items that have a lifetime. This is only used in the Unity Editor or in a Development Player.
CreateBody Create a body using the PhysicsBodyDefinition.defaultDefinition in the world. See PhysicsBody.Create.
CreateBodyBatch Create a batch of bodies in the world.
CreateJoint Create a PhysicsDistanceJoint in the world. See PhysicsDistanceJoint.Create.
Destroy Destroy a world, destroying all objects contained within it such as all PhysicsBody and attached PhysicsShape and PhysicsJoint. If the object is owned with PhysicsWorld.SetOwner then you must provide the owner key it returned. Failing to do so will return a warning and the world will not be destroyed. You cannot destroy the PhysicsWorld.defaultWorld as it is permanently owned by Unity itself.
DrawBox Draw a Box. This is only used in the Unity Editor or in a Development Player. See LowLevelPhysics2D.PhysicsWorld.drawResults.
DrawCapsule Draw a Capsule outline. This is only used in the Unity Editor or in a Development Player. For further information on the parameters. See CapsuleGeometry and LowLevelPhysics2D.PhysicsWorld.drawResults.
DrawCircle Draw a Circle outline. This is only used in the Unity Editor or in a Development Player. For further information on the parameters. See CircleGeometry.
DrawGeometry Draw the specified Circle Geometry. This is only used in the Unity Editor or in a Development Player. See CircleGeometry and LowLevelPhysics2D.PhysicsWorld.drawResults.
DrawLine Draw a Line. This is only used in the Unity Editor or in a Development Player. See LowLevelPhysics2D.PhysicsWorld.drawResults.
DrawLineStrip Draw a set of vertices as lines joined to each other. This is only used in the Unity Editor or in a Development Player. See LowLevelPhysics2D.PhysicsWorld.drawResults.
DrawPoint Draw a Point. This is only used in the Unity Editor or in a Development Player. A Point is similar to a filled Circle except the radius here is specified in pixels rather than world units. See PhysicsWorld.DrawCircle and LowLevelPhysics2D.PhysicsWorld.drawResults.
DrawTransformAxis Draw a Transform axis. This is only used in the Unity Editor or in a Development Player. See LowLevelPhysics2D.PhysicsWorld.drawResults.
Explode Apply a radial explosion applying impulses away from the position to all bodies found within in the radius.
GetBodies Get all the active PhysicsBody in the specified world.
GetBodyUpdateCallbackTargets Get all current PhysicsWorld.bodyUpdateEvents where either of the PhysicsBody involved are valid (see PhysicsBody.isValid) and have a callback target assigned (see PhysicsBody.callbackTarget).
GetContactCallbackTargets Get all current PhysicsWorld.contactBeginEvents and PhysicsWorld.contactEndEvents where either of the PhysicsShape involved are valid (see PhysicsShape.isValid) and have a callback target assigned (see PhysicsShape.callbackTarget).
GetJoints Get all the active PhysicsJoint in the specified world.
GetJointThresholdCallbackTargets Get all current PhysicsWorld.jointThresholdEvents where either of the PhysicsJoint involved are valid (see PhysicsJoint.isValid) and have a callback target assigned (see PhysicsJoint.callbackTarget).
GetOwner Get the owner object associated with this world as specified using PhysicsWorld.SetOwner.
GetTransformWriteTweens Gets all the existing Transform Write Tweens that are handled per-frame.
GetTriggerCallbackTargets Get all current PhysicsWorld.triggerBeginEvents and PhysicsWorld.triggerEndEvents where either of the PhysicsShape involved are valid (see PhysicsShape.isValid) and have a callback target assigned (see PhysicsShape.callbackTarget).
OverlapAABB Returns all shapes that potentially overlap the provided AABB. The overlap is between AABB of shapes in the world therefore it may not result in an exact overlap of the shape itself. See PhysicsAABB, QueryFilter, WorldOverlapResult and Allocator.
OverlapGeometry Returns all shapes that overlap the provided Circle geometry. A circle with a radius of zero is equivalent to PhysicsWorld.OverlapPoint. See CircleGeometry, QueryFilter, WorldOverlapResult and Allocator
OverlapPoint Returns all shapes that overlap the provided point. See QueryFilter, WorldOverlapResult and Allocator.
OverlapShape Returns all shapes that overlap the provided shape. See PolygonGeometry, QueryFilter, see cref="LowLevelPhysics2D.PhysicsQuery.WorldOverlapResult"/> and Allocator.
OverlapShapeProxy Returns all shapes that overlap the shape proxy. See QueryFilter. WorldOverlapResult and Allocator.
Reset Reset the world to a canonical state so that it will reproduce identical results each time. The world must be empty for this to be called otherwise a warning is produced.
SendAllCallbacks Send all callbacks to targets: PhysicsWorld.SendBodyUpdateCallbacksPhysicsWorld.SendTriggerCallbacksPhysicsWorld.SendContactCallbacksPhysicsWorld.SendJointThresholdCallbacks
SendBodyUpdateCallbacks Send all current PhysicsWorld.bodyUpdateEvents where the PhysicsBody involved are valid (see PhysicsBody.isValid) and have a callback target assigned (see PhysicsBody.callbackTarget). Only callback targets that implement IBodyUpdateCallback will be called. This will be called automatically if PhysicsWorld.autoBodyUpdateCallbacks is true. This must be called on the main thread.
SendContactCallbacks Send all current PhysicsWorld.contactBeginEvents and PhysicsWorld.contactEndEvents where either of the PhysicsShape involved are valid (see PhysicsShape.isValid) and have a callback target assigned (see PhysicsShape.callbackTarget). These events will only be created if both of the shape pairs has PhysicsShape.contactEvents set to true. Only callback targets that implement IContactCallback will be called. This will be called automatically if PhysicsWorld.autoContactCallbacks is true. This must be called on the main thread.
SendJointThresholdCallbacks Send all current PhysicsWorld.jointThresholdEvents where the PhysicsJoint involved are valid (see PhysicsJoint.isValid) and have a callback target assigned (see PhysicsJoint.callbackTarget). These events will only be created if the joint exceeds its PhysicsJoint.forceThreshold or PhysicsJoint.torqueThreshold. Only callback targets that implement IJointThresholdCallback will be called. This will be called automatically if PhysicsWorld.autoJointThresholdCallbacks is true. This must be called on the main thread.
SendTriggerCallbacks Send all current PhysicsWorld.triggerBeginEvents and PhysicsWorld.triggerEndEvents where either of the PhysicsShape involved are valid (see PhysicsShape.isValid) and have a callback target assigned (see PhysicsShape.callbackTarget). These events will only be created if one of the shape pairs has PhysicsShape.triggerEvents set to true. Only callback targets that implement ITriggerCallback will be called. This will be called automatically if PhysicsWorld.autoTriggerCallbacks is true. This must be called on the main thread.
SetElementDepth3D Set the element depth using the specified 3D position. The relevant axis will be extracted using the current PhysicsWorld.transformPlane. This is only used in the Unity Editor or in a Development Player. For more details, see PhysicsWorld.elementDepth.
SetOwner Set the (optional) owner object associated with this world and return an owner key that must be specified when destroying the world with PhysicsWorld.Destroy. The physics system provides access to all objects, including the ability to destroy them so this feature can be used to stop accidental destruction of objects that are owned by other objects. You can only set the owner once, multiple attempts will produce a warning. The lifetime of the specified owner object is not linked to this world i.e. this world will still be owned by the owner object, even if it is destroyed. It is also valid to not specify an owner object (NULL) to simply gain an owner key however it can be useful, if simply for debugging purposes and discovery, to know which object is the owner.
Simulate Simulate the world. The world should must have its simulation mode set to UnityEngine.SimulationMode2D.Script.
TestOverlapAABB Tests if the provided AABB potentially overlaps any shapes. The overlap is between AABB of shapes in the world therefore it may not result in an exact overlap of any shape itself. See PhysicsAABB and QueryFilter.
TestOverlapGeometry Tests if the provided Circle geometry overlaps any shapes. A circle with a radius of zero is equivalent to PhysicsWorld.TestOverlapPoint. See CircleGeometry and QueryFilter.
TestOverlapPoint Tests if the provided point overlaps any shapes. See QueryFilter.
TestOverlapShape Tests if the provided shape overlaps any shapes. See PolygonGeometry and QueryFilter.
TestOverlapShapeProxy Test if the provided shape proxy overlaps any shapes.

Static Methods

Method Description
Create Create a PhysicsWorld using the PhysicsWorldDefinition.defaultDefinition.
DestroyBodyBatch Destroy a batch of bodies. Any invalid bodies will be ignored. Owned bodies will produce a warning and will not be destroyed (See PhysicsBody.SetOwner).
DestroyJointBatch Destroy a batch of joints. Any invalid joints will be ignored. Owned joints will produce a warning and will not be destroyed (PhysicsJoint.SetOwner).
DestroyShapeBatch Destroy a batch of shapes, destroying all Contact the shapes are involved in. Any invalid shapes will be ignored including chain segment shapes created via a PhysicsChain (the chain must be destroyed)." Owned shapes will produce a warning and will not be destroyed (PhysicsShape.SetOwner). See MassConfiguration.
GetWorlds Get all the active PhysicsWorld. This includes the PhysicsWorld.defaultWorld so will always contain at least a single world.