GetPositionAndRotation3D(Transform, TransformWriteMode, TransformPlane, out Vector3, out Quaternion)
Get the full 3D position and rotation of the body given the specified PhysicsWorld.TransformWriteMode and PhysicsWorld.TransformPlane. Usually both the write-mode and transform-plane of the world the body is in would be used. This can only be called when a PhysicsBody.transformObject is assigned. Without this, an exception is thrown. See PhysicsWorld.transformWriteMode and PhysicsWorld.transformPlane.
Read time 1 minuteLast updated 14 days ago
Definition
- Type: Method
- Namespace: UnityEngine.LowLevelPhysics2D
- Assembly: UnityEngine.Physics2DModule
GetPositionAndRotation3D(Transform, TransformWriteMode, TransformPlane, Vector3, Quaternion)
public void GetPositionAndRotation3D(Transform transform, PhysicsWorld.TransformWriteMode transformWriteMode, PhysicsWorld.TransformPlane transformPlane, out Vector3 position, out Quaternion rotation)
Parameters
The Transform object to be used as a reference when converting from 2D position/rotation to 3D position/rotation, usually the same as the TransformObject assigned to the PhysicsBody.
The transform write mode to use, usually the one currently assigned to the world is used.
The transform plane to use, usually the one currently assigned to the world is used.
The calculated output position.
The calculated output rotation.