struct in UnityEngine.LowLevelPhysics2D
/
Implemented in:UnityEngine.Physics2DModule
A PhysicsBody definition used to specify important initial properties.
Property | Description |
---|---|
defaultDefinition | Get a default PhysicsBody definition. |
Property | Description |
---|---|
angularDamping | Angular damping is used to reduce the angular velocity over time i.e. slow down rotating bodies. The damping parameter can be larger than 1.0f but the damping effect becomes sensitive to the time step when the damping parameter is large. |
angularVelocity | The initial angular velocity of the body, in degrees/sec. |
awake | Is this body initially awake or sleeping? |
bodyConstraints | The degrees of freedom constraints (locks) for the body of Linear X, Linear Y and Rotation Z. |
bodyType | A body is one of these three body types, Dynamic, Kinematic or Static, each of which determines how the body behaves in the simulation. |
enabled | Used to disable a body. A disabled body does not move or collide. |
fastCollisionsAllowed | Treat this body as high speed object that performs continuous collision detection against dynamic and kinematic bodies, but not other high speed bodies. Fast collision bodies should be used sparingly. They are not a solution for general dynamic-versus-dynamic continuous collision. |
fastRotationAllowed | This allows this body to bypass rotational speed limits. This should only be used for circular objects, such as wheels, balls etc. |
gravityScale | Scale the gravity applied to this body, non-dimensional. |
linearDamping | Linear damping is use to reduce the linear velocity i.e. slow down translating bodies. The damping parameter can be larger than 1 but the damping effect becomes sensitive to the time step when the damping parameter is large. Generally linear damping is undesirable because it makes objects move slowly as if they are floating. |
linearVelocity | The initial linear velocity of the body's origin, in meters/sec. |
position | The initial position of the body, in world-space. Bodies should be created with the desired position as creating bodies at the origin and then moving them nearly doubles the cost of body creation, especially if the body is moved after shapes have been added. |
rotation | The initial rotation of the body, in world-space. Bodies should be created with the desired rotation as creating bodies at the origin and then rotating them nearly doubles the cost of body creation, especially if the body is moved after shapes have been added. |
sleepingAllowed | Set this flag to false if this body should never fall asleep. |
sleepThreshold | A speed threshold below which the body is allowed to sleep. |
transformWriteMode | The method used to Write the body pose to the Transform. |
Constructor | Description |
---|---|
PhysicsBodyDefinition | Create a default PhysicsBody definition. |