An abstract handle that can be used for custom purposes such as handling miscellaneous physics object types abstractly.
You can create a handle with PhysicsHandle.Create or PhysicsHandle.CreateBatch.
You can destroy a handle with PhysicsHandle.Destroy or PhysicsHandle.DestroyBatch.
You can also get a handle from one of the following physics objects:
PhysicsBody.physicsHandlePhysicsShape.physicsHandlePhysicsChain.physicsHandlePhysicsJoint.physicsHandlePhysicsDistanceJoint.physicsHandlePhysicsFixedJoint.physicsHandlePhysicsHingeJoint.physicsHandlePhysicsIgnoreJoint.physicsHandlePhysicsRelativeJoint.physicsHandlePhysicsSliderJoint.physicsHandlePhysicsWheelJoint.physicsHandle
NOTE: When retrieving the handle from another physics object, the object type is not encoded so that must be handled separately.
Because of this, it's entirely possible for two handles to be equal, differing only by the type they came from so care must be taken or the object type explicitly stored against handles.
| Property | Description |
|---|---|
| generation | Get the handle generation. |
| index | Get the handle index. |
| isPoolHandle | Checks if the physics handle is from the physics handle pool or not. This will return false unless thePhysicsHandle was explicitly created with PhysicsHandle.Create or PhysicsHandle.CreateBatch. |
| isValid | Checks if the physics handle is valid in the physics handle pool. This will only work correctly if the PhysicsHandle was explicitly created with PhysicsHandle.Create or PhysicsHandle.CreateBatch. If the handle comes from another physics object, it will not validate that object and a warning will be issued. |
| Method | Description |
|---|---|
| Destroy | Destroy the handle. This will only work correctly if the PhysicsHandle was explicitly created with PhysicsHandle.Create or PhysicsHandle.CreateBatch. NOTE: If the handle comes from another physics object, it will not destroy that object and a warning will be issued. |
| Method | Description |
|---|---|
| Create | Create a PhysicsHandle. |
| CreateBatch | Create a batch of PhysicsHandle. |
| DestroyBatch | Destroy the specified span of PhysicsHandle. NOTE: If any of the handles come from another physics object, it will not destroy that object and a warning will be issued. |